<template>
    <div>
        <el-dialog style="margin-top:5vh" v-model="mer_off" :title="title" :close-on-click-modal='false'
            @close="handleClose" :width="add_data.isReturn == 'true' || add_data.isReturn == '是' ? '70%' : '70%'">
            <div style="display:flex;">
                <div :style="add_data.isReturn == 'true' || add_data.isReturn == '是' ? 'width:48%' : ''">
                   <!-- 接飞机 -->
                    <template v-if="add_data.routeSimpleName == '接天府' || add_data.routeSimpleName == '拼车接天府' || add_data.routeSimpleName == '接双流'">
                           <!-- 接飞机 -->
                           <el-form ref="order" :model="add_data" label-width="110px" label-suffix="：">
                            <el-form-item label="行程简称" :required="false">
                                <el-select @change="routeSimpleName_change"  style="width: 200px;" 
                                    v-model="add_data.routeSimpleName" placeholder="请选择行程简称">
                                    <el-option v-for="(item, index) in routeSimpleName_list" :key="index" :label="item.label"
                                    :value="item.value">
                                </el-option>
                                </el-select>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="客户名称" :required="false">
                                        <el-select @change='cusCompany_change' clearable style="width: 200px;" filterable remote :filter-method="handleFilter"
                                            v-model="add_data.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                            :value="item.userId">
                                            <span style="float: left">{{ item.cusCompanyName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.cusPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="负责人" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="业务员" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                            :value="item.ftUserId">
                                            <span style="float: left">{{ item.realName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{  '（' + item.loginPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            
                              <!-- <el-form-item label="客户名称" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="handleFilter"
                                    v-model="add_data.userId" placeholder="请选择客户">
                                    <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                        :value="item.id">
                                        <span style="float: left">{{ item.cusCompanyName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="负责人" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                    v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                    <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="业务员" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                    v-model="add_data.serviceMan" placeholder="请选择业务员">
                                    <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item> -->
                            <div style="display:flex;">
                                <el-button @click="land_se_btn(1)" style="margin-left:20px"
                                    type="primary">航班号自动查询</el-button>
                                <el-form-item label="接机时间" :required="false">
                                    <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                        format="YYYY-MM-DD HH:mm" v-model="add_data.landDate" type="datetime"
                                        placeholder="请选择接机时间" />
                                        <el-input
                                        v-model="time_number1"
                                        @change='time_number_change1(1)'
                                        style="width: 260px;margin-left:10px"
                                        placeholder="时间转换,格式:1201转换时间为12:01"
                                        clearable
                                      />
                                </el-form-item>


                            </div>

                            <div style="display:flex;width:35vw;">

                                <el-form-item label="接机地点" :required="false">
                                    <el-select @change="aircraft_connect_change" style="width:220px"
                                        v-model="add_data.fromLocation" placeholder="请选择接机地点" clearable>
                                        <el-option v-for="item in aircraft_list" :key="item.id"
                                            :label="item.station_name" :value="item.station_name" />
                                    </el-select>
                                    <el-radio-group v-if="chartered_bus_off" v-model="aircraft_radio"
                                        style="margin-left:20px;">
                                        <el-radio label="包车" size="large">包车</el-radio>
                                        <el-radio label="拼车" size="large">拼车</el-radio>

                                    </el-radio-group>
                                    <el-button v-if="aircraft_radio == '包车'" style="margin-left:30px;margin-bottom:0px"
                                        @click="add_passing_points(1)" type="warning">添加途经点</el-button>
                                </el-form-item>

                            </div>
                            <div v-if="aircraft_radio == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                            </div>
                            <template v-if="passing_points_list.length > 0">
                                <el-form-item v-for="(item, index) in passing_points_index" :key="index"
                                    label="途经地点：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div
                                            style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                            {{
                                               
                                                passing_points_list[index].name
                                            }}</div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="passing_points_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="删除途经">
                                                删除途经
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <div style="display:flex;">
                                <el-form-item label="目的地址" :required="false">
                                    <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  size="mini" style="width:220px" @change="select_Btn"
                                        v-model="add_data.toLocation" class="m-2" placeholder="请选择目的地址">
                                        <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                            :label="item.stationName" :value="item.stationName" >
                                            <span style="float: left">{{ item.stationName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.address + '）' }}</span>
                                        </el-option>
                                    </el-select>
                                </el-form-item>
                                <el-button @click="map_off_btn(1)" style="margin-left:30px;margin-bottom:10px"
                                    type="primary">地图选址</el-button>
                            </div>
                            <el-form-item label="预约人数" :required="false">
                                <el-input type="number" style="width:220px" v-model="add_data.personNum"
                                    placeholder="请输入预约人数"> <template #append>人</template></el-input>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                               
                                        <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                            placeholder="请选择指定车型" style="width: 160px;">
                                            <el-option label="不限车型" value="0"></el-option>
                                            <el-option label="5座" value="5"></el-option>
                                            <el-option label="7座" value="7"></el-option>
                                            <el-option label="9座" value="9"></el-option>
                                            <el-option label="12座" value="12"></el-option>
                                            <el-option label="14座" value="14"></el-option>
                                            <el-option label="17座" value="17"></el-option>
                                             <el-option label="23座" value="23"></el-option>
                                            <el-option label="30座" value="30"></el-option>
                                            <el-option label="39座" value="39"></el-option>
                                            <el-option label="49座" value="49"></el-option>
                                            <el-option label="55座" value="55"></el-option>

                                        </el-select></el-form-item>
                                </el-col>
                                <el-col :span="16">
                                    <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                               
                                        <el-select  v-model="add_data.carConfig" :filterable="false"
                                            placeholder="请选择车辆配置" style="width: 360px;">
                                            <!-- <el-option label="不限车型" value=""></el-option> -->
                                            <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                            :label="item.text+'('+ item.other+')'" :value="item.val" />

                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            <div style="display:flex;" >
                                <el-form-item label="用车费用" :required="false">
                                    <el-input  @input="price_handleInput" type="number" style="width:220px" v-model="add_data.price"
                                        placeholder="请输入用车费用">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>
                            <!-- <el-form-item v-if="aircraft_radio != '拼车'" label="包车天数" :required="false">
                                <el-input type="number" style="width:220px" v-model="add_data.days"
                                    placeholder="请输入包车天数">
                                    <template #append>天</template></el-input>
                            </el-form-item>
                            <div style="display:flex;" v-if="aircraft_radio != '拼车'">
                                <el-form-item label="包车价格" :required="false">
                                    <el-input type="number" style="width:220px" v-model="add_data.price"
                                        placeholder="请输入包车价格">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>

                            <el-form-item v-if="aircraft_radio != '拼车'" label="是否走高速" :required="false">
                                <el-select v-model="add_data.isHighSpeed" :filterable="false"
                                    placeholder="请选择是否走高速" style="width: 220px;">
                                    <el-option label="走高速" value="1"></el-option>
                                    <el-option label="不走高速" value="0"></el-option>

                                </el-select>
                            </el-form-item> -->

                            <el-form-item label="联系人姓名" :required="false">
                                <el-input style="width:220px" v-model="add_data.cusName"
                                    placeholder="请输入联系人姓名" />
                            </el-form-item>
                            <div style="display:flex;">
                                <el-form-item type="number" label="联系人电话" :required="false">
                                    <el-input style="width:220px" v-model="add_data.cusMobile"
                                        placeholder="请输入联系人电话" />
                                </el-form-item>
                                <el-button v-if="aircraft_radio != '拼车'" @click="add_cusName_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                            </div>
                            <template v-if="add_cusName_list.length > 0">
                                <el-form-item v-for="(item, index) in add_cusName_index" :key="index"
                                    label="联系人：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div style="display: flex;">
                                            <el-input style="width:220px" v-model="add_cusName_list[index].name"
                                                placeholder="请输入联系人姓名" />
                                            <el-input style="width:220px"
                                                v-model="add_cusName_list[index].mobile"
                                                placeholder="请输入联系人电话" />
                                        </div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="add_cusName_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="联系人">
                                                联系人
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <!-- <el-form-item label="是否返程" :required="false">
                                <el-select @change="isReturnAdd_change" style="width:220px"
                                    v-model="add_data.isReturn" placeholder="请选择是否返程">
                                    <el-option v-for="item in isReturn_list" :key="item.value"
                                        :label="item.label" :value="item.value" />
                                </el-select>
                            </el-form-item> -->
                          
                            <el-form-item label="驾驶员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入驾驶员备注" v-model="add_data.driverRemark" />
                            </el-form-item>
                            <el-form-item label="业务员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入业务员备注" v-model="add_data.serviceManRemark" />
                            </el-form-item>
                            <el-form-item label="客户备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                    placeholder="请输入客户备注" v-model="add_data.remark" />
                            </el-form-item>
                            <!-- <el-collapse>
                                <el-collapse-item title="显示更多选填信息" name="1">

                                    <el-form-item label="备注" :required="false">
                                        <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                            placeholder="请输入备注" v-model="add_data.remark" />
                                    </el-form-item>
                                </el-collapse-item>

                            </el-collapse> -->

                        </el-form>
                    </template>
                     <!-- 送飞机 -->
                    <template v-if="add_data.routeSimpleName == '送天府' || add_data.routeSimpleName == '拼车送天府' || add_data.routeSimpleName == '送双流'">
                        <el-form ref="order" :model="add_data" label-width="110px" label-suffix="：">
                            <el-form-item label="行程简称" :required="false">
                                <el-select  @change="routeSimpleName_change" style="width: 200px;" 
                                    v-model="add_data.routeSimpleName" placeholder="请选择行程简称">
                                    <el-option v-for="(item, index) in routeSimpleName_list" :key="index" :label="item.label"
                                    :value="item.value">
                                </el-option>
                                </el-select>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="客户名称" :required="false">
                                        <el-select @change='cusCompany_change' clearable style="width: 200px;" filterable remote :filter-method="handleFilter"
                                            v-model="add_data.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                            :value="item.userId">
                                            <span style="float: left">{{ item.cusCompanyName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.cusPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="负责人" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="业务员" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                            :value="item.ftUserId">
                                            <span style="float: left">{{ item.realName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{  '（' + item.loginPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            
                              <!-- <el-form-item label="客户名称" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="handleFilter"
                                    v-model="add_data.userId" placeholder="请选择客户">
                                    <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                        :value="item.id">
                                        <span style="float: left">{{ item.cusCompanyName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="负责人" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                    v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                    <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="业务员" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                    v-model="add_data.serviceMan" placeholder="请选择业务员">
                                    <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item> -->
                            <div style="display:flex;">
                                <el-button @click="land_se_btn(1)" style="margin-left:20px"
                                    type="primary">航班号自动查询</el-button>
                                <el-form-item label="送机时间" :required="false">
                                    <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                        format="YYYY-MM-DD HH:mm" v-model="add_data.flightDate" type="datetime"
                                        placeholder="请选择送机时间" />
                                        <el-input
                                        v-model="time_number1"
                                        @change='time_number_change1(2)'
                                        style="width: 260px;margin-left:10px"
                                        placeholder="时间转换,格式:1201转换时间为12:01"
                                        clearable
                                      />
                                </el-form-item>


                            </div>
                            <div style="display:flex;">
                                <el-form-item label="接人地址" :required="false">
                                    <el-select  style="width:220px"  :filter-method="stationNamehandleFilter" clearable filterable remote  @change="select_Btn" v-model="add_data.fromLocation" class="m-2"
                                        placeholder="请选择接人地址" size="mini">
                                        <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                        :label="item.stationName" :value="item.stationName" >
                                        <span style="float: left">{{ item.stationName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ '（' + item.address + '）' }}</span>
                                    </el-option>
                                    </el-select>
                                </el-form-item>
                                <el-button @click="map_off_btn(1)" style="margin-left:30px;margin-bottom:10px"
                                    type="primary">地图选址</el-button>
                            </div>

                            <template v-if="passing_points_list.length > 0">
                                <el-form-item v-for="(item, index) in passing_points_index" :key="index"
                                    label="途经地点：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div
                                            style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                            {{
                                     
                                                passing_points_list[index].name
                                            }}</div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="passing_points_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="删除途经">
                                                删除途经
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <div style="display:flex;width:35vw;">

                                <el-form-item label="送机地点" :required="false">
                                    <el-select @change="aircraft_connect_change" style="width:220px"
                                        v-model="add_data.toLocation" placeholder="请选择送机地点" clearable>
                                        <el-option v-for="item in aircraft_list" :key="item.id"
                                            :label="item.station_name" :value="item.station_name" />
                                    </el-select>
                                    <el-radio-group v-if="chartered_bus_off" v-model="aircraft_radio"
                                        style="margin-left:20px;">
                                        <el-radio label="包车" size="large">包车</el-radio>
                                        <el-radio label="拼车" size="large">拼车</el-radio>

                                    </el-radio-group>
                                    <el-button v-if="aircraft_radio == '包车'" style="margin-left:30px;margin-bottom:0px"
                                        @click="add_passing_points(1)" type="warning">添加途经点</el-button>
                                </el-form-item>

                            </div>
                            <div v-if="aircraft_radio == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                            </div>
                            <el-form-item type="number" label="预约人数" :required="false">
                                <el-input style="width:220px" v-model="add_data.personNum"
                                    placeholder="请输入预约人数">
                                    <template #append>人</template></el-input>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                               
                                        <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                            placeholder="请选择指定车型" style="width: 160px;">
                                            <el-option label="不限车型" value="0"></el-option>
                                            <el-option label="5座" value="5"></el-option>
                                            <el-option label="7座" value="7"></el-option>
                                            <el-option label="9座" value="9"></el-option>
                                            <el-option label="12座" value="12"></el-option>
                                            <el-option label="14座" value="14"></el-option>
                                            <el-option label="17座" value="17"></el-option>
                                             <el-option label="23座" value="23"></el-option>
                                            <el-option label="30座" value="30"></el-option>
                                            <el-option label="39座" value="39"></el-option>
                                            <el-option label="49座" value="49"></el-option>
                                            <el-option label="55座" value="55"></el-option>

                                        </el-select></el-form-item>
                                </el-col>
                                <el-col :span="16">
                                    <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                               
                                        <el-select  v-model="add_data.carConfig" :filterable="false"
                                            placeholder="请选择车辆配置" style="width: 360px;">
                                            <!-- <el-option label="不限车型" value=""></el-option> -->
                                            <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                            :label="item.text+'('+ item.other+')'" :value="item.val" />

                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            <div style="display:flex;" >
                                <el-form-item label="用车费用" :required="false">
                                    <el-input  @input="price_handleInput" type="number" style="width:220px" v-model="add_data.price"
                                        placeholder="请输入用车费用">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>
                            <!-- <el-form-item v-if="aircraft_radio != '拼车'" label="包车天数" :required="false">
                                <el-input style="width:220px" v-model="add_data.days" placeholder="请输入包车天数">
                                    <template #append>天</template></el-input>
                            </el-form-item>
                            <div style="display:flex;" v-if="aircraft_radio != '拼车'">
                                <el-form-item label="包车价格" :required="false">
                                    <el-input style="width:220px" v-model="add_data.price"
                                        placeholder="请输入包车价格">

                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>

                            <el-form-item v-if="aircraft_radio != '拼车'" label="是否走高速" :required="false">
                                <el-select v-model="add_data.isHighSpeed" :filterable="false"
                                    placeholder="请选择是否走高速" style="width: 220px;">
                                    <el-option label="走高速" value="1"></el-option>
                                    <el-option label="不走高速" value="0"></el-option>

                                </el-select>
                            </el-form-item> -->

                            <el-form-item label="联系人姓名" :required="false">
                                <el-input style="width:220px" v-model="add_data.cusName"
                                    placeholder="请输入联系人姓名" />
                            </el-form-item>
                            <div style="display:flex;">
                                <el-form-item type="number" label="联系人电话" :required="false">
                                    <el-input style="width:220px" v-model="add_data.cusMobile"
                                        placeholder="请输入联系人电话" />
                                </el-form-item>
                                <el-button v-if="aircraft_radio != '拼车'" @click="add_cusName_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                            </div>
                            <template v-if="add_cusName_list.length > 0">
                                <el-form-item v-for="(item, index) in add_cusName_index" :key="index"
                                    label="联系人：">
                                    <div style="display: flex;">
                                        <div style="display: flex;">
                                            <el-input style="width:220px" v-model="add_cusName_list[index].name"
                                                placeholder="请输入联系人姓名" />
                                            <el-input style="width:220px"
                                                v-model="add_cusName_list[index].mobile"
                                                placeholder="请输入联系人电话" />
                                        </div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="add_cusName_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="联系人">
                                                联系人
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <!-- <el-form-item label="是否返程" :required="false">
                                <el-select @change="isReturnAdd_change" style="width:220px"
                                    v-model="add_data.isReturn" placeholder="请选择是否返程">
                                    <el-option v-for="item in isReturn_list" :key="item.value"
                                        :label="item.label" :value="item.value" />
                                </el-select>
                            </el-form-item> -->
                           
                            <el-form-item label="驾驶员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入驾驶员备注" v-model="add_data.driverRemark" />
                            </el-form-item>
                            <el-form-item label="业务员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入业务员备注" v-model="add_data.serviceManRemark" />
                            </el-form-item>
                            <el-form-item label="客户备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                    placeholder="请输入客户备注" v-model="add_data.remark" />
                            </el-form-item>
                            <!-- <el-collapse>
                                <el-collapse-item title="显示更多选填信息" name="1">

                                    <el-form-item label="备注" :required="false">
                                        <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                            placeholder="请输入备注" v-model="add_data.remark" />
                                    </el-form-item>
                                </el-collapse-item>

                            </el-collapse> -->
                        </el-form>
                    </template>
                        <!-- 接火车 -->
                    <template v-if="add_data.routeSimpleName == '接东站' || add_data.routeSimpleName == '接西站' || add_data.routeSimpleName == '接南站'|| add_data.routeSimpleName == '接北站'">
                        <el-form ref="order" :model="add_data" label-width="110px" label-suffix="：">
                            <el-form-item label="行程简称" :required="false">
                                <el-select  @change="routeSimpleName_change" style="width: 200px;" 
                                    v-model="add_data.routeSimpleName" placeholder="请选择行程简称">
                                    <el-option v-for="(item, index) in routeSimpleName_list" :key="index" :label="item.label"
                                    :value="item.value">
                                </el-option>
                                </el-select>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="客户名称" :required="false">
                                        <el-select @change='cusCompany_change' clearable style="width: 200px;" filterable remote :filter-method="handleFilter"
                                            v-model="add_data.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                            :value="item.userId">
                                            <span style="float: left">{{ item.cusCompanyName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.cusPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="负责人" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="业务员" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                            :value="item.ftUserId">
                                            <span style="float: left">{{ item.realName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{  '（' + item.loginPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            
                              <!-- <el-form-item label="客户名称" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="handleFilter"
                                    v-model="add_data.userId" placeholder="请选择客户">
                                    <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                        :value="item.id">
                                        <span style="float: left">{{ item.cusCompanyName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="负责人" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                    v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                    <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="业务员" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                    v-model="add_data.serviceMan" placeholder="请选择业务员">
                                    <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item> -->
                            <div style="display:flex;">
                                <el-button @click="train_se_btn(1)" style="margin-left:20px"
                                    type="primary">列车号自动查询</el-button>
                                <el-form-item label="接火车时间" :required="false">
                                    <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                        format="YYYY-MM-DD HH:mm" v-model="add_data.landDate" type="datetime"
                                        placeholder="请选择接火车时间" />
                                        <el-input
                                        v-model="time_number1"
                                        @change='time_number_change1(1)'
                                        style="width: 260px;margin-left:10px"
                                        placeholder="时间转换,格式:1201转换时间为12:01"
                                        clearable
                                      />
                                </el-form-item>


                            </div>

                            <div style="display:flex;width:35vw;">

                                <el-form-item label="接火车地点" :required="false">
                                    <el-select @change="aircraft_connect_change" style="width:220px"
                                        v-model="add_data.fromLocation" placeholder="请选择接火车地点" clearable>
                                        <el-option v-for="item in train_list" :key="item.id"
                                            :label="item.station_name" :value="item.station_name" />
                                    </el-select>
                                    <el-radio-group v-if="chartered_bus_off" v-model="aircraft_radio"
                                        style="margin-left:20px;">
                                        <el-radio label="包车" size="large">包车</el-radio>
                                        <el-radio label="拼车" size="large">拼车</el-radio>

                                    </el-radio-group>
                                    <el-button v-if="aircraft_radio == '包车'" style="margin-left:30px;margin-bottom:0px"
                                        @click="add_passing_points(1)" type="warning">添加途经点</el-button>
                                </el-form-item>

                            </div>
                            <div v-if="aircraft_radio == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                            </div>
                            <template v-if="passing_points_list.length > 0">
                                <el-form-item v-for="(item, index) in passing_points_index" :key="index"
                                    label="途经地点：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div
                                            style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                            {{
                                            
                                                passing_points_list[index].name
                                            }}</div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="passing_points_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="删除途经">
                                                删除途经
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <div style="display:flex;">
                                <el-form-item label="目的地址" :required="false">
                                    <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  size="mini" style="width:220px" @change="select_Btn"
                                        v-model="add_data.toLocation" class="m-2" placeholder="请选择目的地址">
                                        <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                            :label="item.stationName" :value="item.stationName" >
                                            <span style="float: left">{{ item.stationName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.address + '）' }}</span>
                                        </el-option>
                                    </el-select>
                                </el-form-item>
                                <el-button @click="map_off_btn(1)" style="margin-left:30px;margin-bottom:10px"
                                    type="primary">地图选址</el-button>
                            </div>
                            <el-form-item label="预约人数" :required="false">
                                <el-input type="number" style="width:220px" v-model="add_data.personNum"
                                    placeholder="请输入预约人数"> <template #append>人</template></el-input>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                               
                                        <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                            placeholder="请选择指定车型" style="width: 160px;">
                                            <el-option label="不限车型" value="0"></el-option>
                                            <el-option label="5座" value="5"></el-option>
                                            <el-option label="7座" value="7"></el-option>
                                            <el-option label="9座" value="9"></el-option>
                                            <el-option label="12座" value="12"></el-option>
                                            <el-option label="14座" value="14"></el-option>
                                            <el-option label="17座" value="17"></el-option>
                                             <el-option label="23座" value="23"></el-option>
                                            <el-option label="30座" value="30"></el-option>
                                            <el-option label="39座" value="39"></el-option>
                                            <el-option label="49座" value="49"></el-option>
                                            <el-option label="55座" value="55"></el-option>

                                        </el-select></el-form-item>
                                </el-col>
                                <el-col :span="16">
                                    <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                               
                                        <el-select  v-model="add_data.carConfig" :filterable="false"
                                            placeholder="请选择车辆配置" style="width: 360px;">
                                            <!-- <el-option label="不限车型" value=""></el-option> -->
                                            <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                            :label="item.text+'('+ item.other+')'" :value="item.val" />

                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            <div style="display:flex;" >
                                <el-form-item label="用车费用" :required="false">
                                    <el-input  @input="price_handleInput" type="number" style="width:220px" v-model="add_data.price"
                                        placeholder="请输入用车费用">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>
                            <!-- <el-form-item v-if="aircraft_radio != '拼车'" label="包车天数" :required="false">
                                <el-input type="number" style="width:220px" v-model="add_data.days"
                                    placeholder="请输入包车天数">
                                    <template #append>天</template></el-input>
                            </el-form-item>
                            <div style="display:flex;" v-if="aircraft_radio != '拼车'">
                                <el-form-item label="包车价格" :required="false">
                                    <el-input type="number" style="width:220px" v-model="add_data.price"
                                        placeholder="请输入包车价格">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>

                            <el-form-item v-if="aircraft_radio != '拼车'" label="是否走高速" :required="false">
                                <el-select v-model="add_data.isHighSpeed" :filterable="false"
                                    placeholder="请选择是否走高速" style="width: 220px;">
                                    <el-option label="走高速" value="1"></el-option>
                                    <el-option label="不走高速" value="0"></el-option>

                                </el-select>
                            </el-form-item> -->

                            <el-form-item label="联系人姓名" :required="false">
                                <el-input style="width:220px" v-model="add_data.cusName"
                                    placeholder="请输入联系人姓名" />
                            </el-form-item>
                            <div style="display:flex;">
                                <el-form-item type="number" label="联系人电话" :required="false">
                                    <el-input style="width:220px" v-model="add_data.cusMobile"
                                        placeholder="请输入联系人电话" />
                                </el-form-item>
                                <el-button v-if="aircraft_radio != '拼车'" @click="add_cusName_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                            </div>
                            <template v-if="add_cusName_list.length > 0">
                                <el-form-item v-for="(item, index) in add_cusName_index" :key="index"
                                    label="联系人：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div style="display: flex;">
                                            <el-input style="width:220px" v-model="add_cusName_list[index].name"
                                                placeholder="请输入联系人姓名" />
                                            <el-input style="width:220px"
                                                v-model="add_cusName_list[index].mobile"
                                                placeholder="请输入联系人电话" />
                                        </div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="add_cusName_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="联系人">
                                                联系人
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <!-- <el-form-item label="是否返程" :required="false">
                                <el-select @change="isReturnAdd_change" style="width:220px"
                                    v-model="add_data.isReturn" placeholder="请选择是否返程">
                                    <el-option v-for="item in isReturn_list" :key="item.value"
                                        :label="item.label" :value="item.value" />
                                </el-select>
                            </el-form-item> -->
                          
                            <el-form-item label="驾驶员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入驾驶员备注" v-model="add_data.driverRemark" />
                            </el-form-item>
                            <el-form-item label="业务员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入业务员备注" v-model="add_data.serviceManRemark" />
                            </el-form-item>
                            <el-form-item label="客户备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                    placeholder="请输入客户备注" v-model="add_data.remark" />
                            </el-form-item>
                            <!-- <el-collapse>
                                <el-collapse-item title="显示更多选填信息" name="1">

                                    <el-form-item label="备注" :required="false">
                                        <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                            placeholder="请输入备注" v-model="add_data.remark" />
                                    </el-form-item>
                                </el-collapse-item>

                            </el-collapse> -->

                        </el-form>
                    </template>
                    <!-- 送火车 -->
                    <template v-if="add_data.routeSimpleName == '送东站' || add_data.routeSimpleName == '送西站' || add_data.routeSimpleName == '送南站' || add_data.routeSimpleName == '送北站'">
                        <el-form ref="order" :model="add_data" label-width="110px" label-suffix="：">
                            <el-form-item label="行程简称" :required="false">
                                <el-select  @change="routeSimpleName_change" style="width: 200px;" 
                                    v-model="add_data.routeSimpleName" placeholder="请选择行程简称">
                                    <el-option v-for="(item, index) in routeSimpleName_list" :key="index" :label="item.label"
                                    :value="item.value">
                                </el-option>
                                </el-select>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="客户名称" :required="false">
                                        <el-select @change='cusCompany_change' clearable style="width: 200px;" filterable remote :filter-method="handleFilter"
                                            v-model="add_data.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                            :value="item.userId">
                                            <span style="float: left">{{ item.cusCompanyName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.cusPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="负责人" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="业务员" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                            :value="item.ftUserId">
                                            <span style="float: left">{{ item.realName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{  '（' + item.loginPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            
                              <!-- <el-form-item label="客户名称" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="handleFilter"
                                    v-model="add_data.userId" placeholder="请选择客户">
                                    <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                        :value="item.id">
                                        <span style="float: left">{{ item.cusCompanyName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="负责人" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                    v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                    <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="业务员" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                    v-model="add_data.serviceMan" placeholder="请选择业务员">
                                    <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item> -->
                            <div style="display:flex;">
                                <el-button @click="train_se_btn(1)" style="margin-left:20px"
                                    type="primary">列车号自动查询</el-button>
                                <el-form-item label="送火车时间" :required="false">
                                    <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                        format="YYYY-MM-DD HH:mm" v-model="add_data.flightDate" type="datetime"
                                        placeholder="请选择送火车时间" />
                                        <el-input
                                        v-model="time_number1"
                                        @change='time_number_change1(2)'
                                        style="width: 260px;margin-left:10px"
                                        placeholder="时间转换,格式:1201转换时间为12:01"
                                        clearable
                                      />
                                </el-form-item>


                            </div>
                            <div style="display:flex;">
                                <el-form-item label="接人地址" :required="false">
                                    <el-select style="width:220px"  :filter-method="stationNamehandleFilter" clearable filterable remote  @change="select_Btn" v-model="add_data.fromLocation" class="m-2"
                                        placeholder="请选择接人地址" size="mini">
                                        <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                        :label="item.stationName" :value="item.stationName" >
                                        <span style="float: left">{{ item.stationName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ '（' + item.address + '）' }}</span>
                                    </el-option>
                                    </el-select>
                                </el-form-item>
                                <el-button @click="map_off_btn(1)" style="margin-left:30px;margin-bottom:10px"
                                    type="primary">地图选址</el-button>
                            </div>

                            <template v-if="passing_points_list.length > 0">
                                <el-form-item v-for="(item, index) in passing_points_index" :key="index"
                                    label="途经地点：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div
                                            style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                            {{
                                            
                                                passing_points_list[index].name
                                            }}</div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="passing_points_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="删除途经">
                                                删除途经
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <div style="display:flex;width:35vw;">

                                <el-form-item label="送火车地点" :required="false">
                                    <el-select @change="aircraft_connect_change" style="width:220px"
                                        v-model="add_data.toLocation" placeholder="请选择送火车地点" clearable>
                                        <el-option v-for="item in train_list" :key="item.id"
                                            :label="item.station_name" :value="item.station_name" />
                                    </el-select>
                                    <el-radio-group v-if="chartered_bus_off" v-model="aircraft_radio"
                                        style="margin-left:20px;">
                                        <el-radio label="包车" size="large">包车</el-radio>
                                        <el-radio label="拼车" size="large">拼车</el-radio>

                                    </el-radio-group>
                                    <el-button v-if="aircraft_radio == '包车'" style="margin-left:30px;margin-bottom:0px"
                                        @click="add_passing_points(1)" type="warning">添加途经点</el-button>
                                </el-form-item>

                            </div>
                            <div v-if="aircraft_radio == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                            </div>
                            <el-form-item type="number" label="预约人数" :required="false">
                                <el-input style="width:220px" v-model="add_data.personNum"
                                    placeholder="请输入预约人数">
                                    <template #append>人</template></el-input>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                               
                                        <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                            placeholder="请选择指定车型" style="width: 160px;">
                                            <el-option label="不限车型" value="0"></el-option>
                                            <el-option label="5座" value="5"></el-option>
                                            <el-option label="7座" value="7"></el-option>
                                            <el-option label="9座" value="9"></el-option>
                                            <el-option label="12座" value="12"></el-option>
                                            <el-option label="14座" value="14"></el-option>
                                            <el-option label="17座" value="17"></el-option>
                                             <el-option label="23座" value="23"></el-option>
                                            <el-option label="30座" value="30"></el-option>
                                            <el-option label="39座" value="39"></el-option>
                                            <el-option label="49座" value="49"></el-option>
                                            <el-option label="55座" value="55"></el-option>

                                        </el-select></el-form-item>
                                </el-col>
                                <el-col :span="16">
                                    <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                               
                                        <el-select  v-model="add_data.carConfig" :filterable="false"
                                            placeholder="请选择车辆配置" style="width: 360px;">
                                            <!-- <el-option label="不限车型" value=""></el-option> -->
                                            <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                            :label="item.text+'('+ item.other+')'" :value="item.val" />

                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            <div style="display:flex;" >
                                <el-form-item label="用车费用" :required="false">
                                    <el-input  @input="price_handleInput" type="number" style="width:220px" v-model="add_data.price"
                                        placeholder="请输入用车费用">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>
                            <!-- <el-form-item v-if="aircraft_radio != '拼车'" label="包车天数" :required="false">
                                <el-input style="width:220px" v-model="add_data.days" placeholder="请输入包车天数">
                                    <template #append>天</template></el-input>
                            </el-form-item>
                            <div style="display:flex;" v-if="aircraft_radio != '拼车'">
                                <el-form-item label="包车价格" :required="false">
                                    <el-input style="width:220px" v-model="add_data.price"
                                        placeholder="请输入包车价格">

                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>

                            <el-form-item v-if="aircraft_radio != '拼车'" label="是否走高速" :required="false">
                                <el-select v-model="add_data.isHighSpeed" :filterable="false"
                                    placeholder="请选择是否走高速" style="width: 220px;">
                                    <el-option label="走高速" value="1"></el-option>
                                    <el-option label="不走高速" value="0"></el-option>

                                </el-select>
                            </el-form-item> -->

                            <el-form-item label="联系人姓名" :required="false">
                                <el-input style="width:220px" v-model="add_data.cusName"
                                    placeholder="请输入联系人姓名" />
                            </el-form-item>
                            <div style="display:flex;">
                                <el-form-item type="number" label="联系人电话" :required="false">
                                    <el-input style="width:220px" v-model="add_data.cusMobile"
                                        placeholder="请输入联系人电话" />
                                </el-form-item>
                                <el-button v-if="aircraft_radio != '拼车'" @click="add_cusName_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                            </div>
                            <template v-if="add_cusName_list.length > 0">
                                <el-form-item v-for="(item, index) in add_cusName_index" :key="index"
                                    label="联系人：">
                                    <div style="display: flex;">
                                        <div style="display: flex;">
                                            <el-input style="width:220px" v-model="add_cusName_list[index].name"
                                                placeholder="请输入联系人姓名" />
                                            <el-input style="width:220px"
                                                v-model="add_cusName_list[index].mobile"
                                                placeholder="请输入联系人电话" />
                                        </div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="add_cusName_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="联系人">
                                                联系人
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <!-- <el-form-item label="是否返程" :required="false">
                                <el-select @change="isReturnAdd_change" style="width:220px"
                                    v-model="add_data.isReturn" placeholder="请选择是否返程">
                                    <el-option v-for="item in isReturn_list" :key="item.value"
                                        :label="item.label" :value="item.value" />
                                </el-select>
                            </el-form-item> -->
                          
                            <el-form-item label="驾驶员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入驾驶员备注" v-model="add_data.driverRemark" />
                            </el-form-item>
                            <el-form-item label="业务员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入业务员备注" v-model="add_data.serviceManRemark" />
                            </el-form-item>
                            <el-form-item label="客户备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                    placeholder="请输入客户备注" v-model="add_data.remark" />
                            </el-form-item>
                            <!-- <el-collapse>
                                <el-collapse-item title="显示更多选填信息" name="1">

                                    <el-form-item label="备注" :required="false">
                                        <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                            placeholder="请输入备注" v-model="add_data.remark" />
                                    </el-form-item>
                                </el-collapse-item>

                            </el-collapse> -->
                        </el-form>
                    </template>
                    <!-- 接大巴 -->
                    <template v-if="add_data.routeSimpleName == '接集合点大巴'">
                        <el-form :model="add_data" label-width="110px" label-suffix="：">
                            <el-form-item label="行程简称" :required="false">
                                <el-select  @change="routeSimpleName_change" style="width: 200px;" 
                                    v-model="add_data.routeSimpleName" placeholder="请选择行程简称">
                                    <el-option v-for="(item, index) in routeSimpleName_list" :key="index" :label="item.label"
                                    :value="item.value">
                                </el-option>
                                </el-select>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="客户名称" :required="false">
                                        <el-select @change='cusCompany_change' clearable style="width: 200px;" filterable remote :filter-method="handleFilter"
                                            v-model="add_data.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                            :value="item.userId">
                                            <span style="float: left">{{ item.cusCompanyName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.cusPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="负责人" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                            :value="item.ftUserId">
                                            <span style="float: left">{{ item.realName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.loginPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="业务员" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                            :value="item.ftUserId">
                                            <span style="float: left">{{ item.realName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{  '（' + item.loginPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            
                              <!-- <el-form-item label="客户名称" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="handleFilter"
                                    v-model="add_data.userId" placeholder="请选择客户">
                                    <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                        :value="item.id">
                                        <span style="float: left">{{ item.cusCompanyName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="负责人" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                    v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                    <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="业务员" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                    v-model="add_data.serviceMan" placeholder="请选择业务员">
                                    <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item> -->
                            <div style="display:flex;">
                                <!-- <el-button @click="land_se_btn" style="margin-left:20px"
                                    type="primary">航班号自动查询</el-button> -->
                                <el-form-item label="接车时间" :required="false">
                                    <el-date-picker style=" width: 160px" value-format="YYYY-MM-DD HH:mm"
                                        format="YYYY-MM-DD HH:mm" v-model="add_data.landDate" type="datetime"
                                        placeholder="请选择接车时间" />
                                        <el-input
                                        v-model="time_number1"
                                        @change='time_number_change1(1)'
                                        style="width: 260px;margin-left:10px"
                                        placeholder="时间转换,格式:1201转换时间为12:01"
                                        clearable
                                      />
                                </el-form-item>


                            </div>

                            <div style="display:flex;width:45vw;">

                                <el-form-item label="接大巴地点" :required="false">
                                    <div @click="car_map_btn(1)">
                                        <!-- <el-input disabled style="width:220px" v-model="add_data.fromLocation"
                                            placeholder="请选择接大巴地点" /> -->
                                            <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  style="width:220px" @change="bus_select_Btn1"
                                            v-model="add_data.fromLocation" class="m-2" placeholder="请选择接大巴地点"
                                            size="mini">
                                            <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                            :label="item.stationName" :value="item.stationName" >
                                            <span style="float: left">{{ item.stationName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.address + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </div>
                                    <el-radio-group v-if="chartered_bus_off" v-model="aircraft_radio"
                                        style="margin-left:20px;">
                                        <el-radio label="拼车" size="large">拼车</el-radio>
                                        <el-radio label="包车" size="large">包车</el-radio>
                                    </el-radio-group>
                                    <el-button @click="bus_map_off_btn(1)" style="margin-left:30px;"
                                        type="primary">地图选址</el-button>
                                    <el-button v-if="aircraft_radio == '包车'" style="margin-left:30px;margin-bottom:0px"
                                        @click="add_passing_points(1)" type="warning">添加途经点</el-button>
                                </el-form-item>

                            </div>
                            <div v-if="aircraft_radio == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                            </div>
                            <template v-if="passing_points_list.length > 0">
                                <el-form-item v-for="(item, index) in passing_points_index" :key="index"
                                    label="途经地点：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div
                                            style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                            {{
                                            
                                                passing_points_list[index].name
                                            }}</div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="passing_points_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="删除途经">
                                                删除途经
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <div style="display:flex;">
                                <el-form-item label="目的地址" :required="false">
                                    <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  style="width:220px" @change="bus_select_Btn2"
                                        v-model="add_data.toLocation" class="m-2" placeholder="请选择目的地址"
                                        size="mini">
                                        <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                        :label="item.stationName" :value="item.stationName" >
                                        <span style="float: left">{{ item.stationName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ '（' + item.address + '）' }}</span>
                                    </el-option>
                                    </el-select>
                                </el-form-item>
                                <el-button @click="bus_map_off_btn(2)"
                                    style="margin-left:30px;margin-bottom:10px" type="primary">地图选址</el-button>
                            </div>
                            <el-form-item type="number" label="预约人数" :required="false">
                                <el-input style="width:220px" v-model="add_data.personNum"
                                    placeholder="请输入预约人数">
                                    <template #append>人</template></el-input>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                               
                                        <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                            placeholder="请选择指定车型" style="width: 160px;">
                                            <el-option label="不限车型" value="0"></el-option>
                                            <el-option label="5座" value="5"></el-option>
                                            <el-option label="7座" value="7"></el-option>
                                            <el-option label="9座" value="9"></el-option>
                                            <el-option label="12座" value="12"></el-option>
                                            <el-option label="14座" value="14"></el-option>
                                            <el-option label="17座" value="17"></el-option>
                                             <el-option label="23座" value="23"></el-option>
                                            <el-option label="30座" value="30"></el-option>
                                            <el-option label="39座" value="39"></el-option>
                                            <el-option label="49座" value="49"></el-option>
                                            <el-option label="55座" value="55"></el-option>

                                        </el-select></el-form-item>
                                </el-col>
                                <el-col :span="16">
                                    <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                               
                                        <el-select  v-model="add_data.carConfig" :filterable="false"
                                            placeholder="请选择车辆配置" style="width: 360px;">
                                            <!-- <el-option label="不限车型" value=""></el-option> -->
                                            <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                            :label="item.text+'('+ item.other+')'" :value="item.val" />

                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            <div style="display:flex;" >
                                <el-form-item label="用车费用" :required="false">
                                    <el-input  @input="price_handleInput" type="number" style="width:220px" v-model="add_data.price"
                                        placeholder="请输入用车费用">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>
                            <!-- <el-form-item v-if="aircraft_radio != '拼车'" label="包车天数" :required="false">
                                <el-input style="width:220px" v-model="add_data.days" placeholder="请输入包车天数">
                                    <template #append>天</template></el-input>
                            </el-form-item>
                            <div style="display:flex;" v-if="aircraft_radio != '拼车'">
                                <el-form-item label="包车价格" :required="false">
                                    <el-input style="width:220px" v-model="add_data.price"
                                        placeholder="请输入包车价格">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>

                            <el-form-item v-if="aircraft_radio != '拼车'" label="是否走高速" :required="false">
                                <el-select v-model="add_data.isHighSpeed" :filterable="false"
                                    placeholder="请选择是否走高速" style="width: 220px;">
                                    <el-option label="走高速" value="1"></el-option>
                                    <el-option label="不走高速" value="0"></el-option>

                                </el-select>
                            </el-form-item> -->

                            <el-form-item label="联系人姓名" :required="false">
                                <el-input style="width:220px" v-model="add_data.cusName"
                                    placeholder="请输入联系人姓名" />
                            </el-form-item>
                            <div style="display:flex;">
                                <el-form-item type="number" label="联系人电话" :required="false">
                                    <el-input style="width:220px" v-model="add_data.cusMobile"
                                        placeholder="请输入联系人电话" />
                                </el-form-item>
                                <el-button v-if="aircraft_radio != '拼车'" @click="add_cusName_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                            </div>
                            <template v-if="add_cusName_list.length > 0">
                                <el-form-item v-for="(item, index) in add_cusName_index" :key="index"
                                    label="联系人：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div style="display: flex;">
                                            <el-input style="width:220px" v-model="add_cusName_list[index].name"
                                                placeholder="请输入联系人姓名" />
                                            <el-input style="width:220px"
                                                v-model="add_cusName_list[index].mobile"
                                                placeholder="请输入联系人电话" />
                                        </div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="add_cusName_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="联系人">
                                                联系人
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <!-- <el-form-item label="是否返程" :required="false">
                                <el-select @change="isReturnAdd_change" style="width:220px"
                                    v-model="add_data.isReturn" placeholder="请选择是否返程">
                                    <el-option v-for="item in isReturn_list" :key="item.value"
                                        :label="item.label" :value="item.value" />
                                </el-select>
                            </el-form-item> -->
                           
                            <el-form-item label="驾驶员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入驾驶员备注" v-model="add_data.driverRemark" />
                            </el-form-item>
                            <el-form-item label="业务员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入业务员备注" v-model="add_data.serviceManRemark" />
                            </el-form-item>
                            <el-form-item label="客户备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                    placeholder="请输入客户备注" v-model="add_data.remark" />
                            </el-form-item>
                            <!-- <el-collapse>
                                <el-collapse-item title="显示更多选填信息" name="1">

                                    <el-form-item label="备注" :required="false">
                                        <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                            placeholder="请输入备注" v-model="add_data.remark" />
                                    </el-form-item>
                                </el-collapse-item>

                            </el-collapse> -->







                        </el-form>
                    </template>
                      <!-- 送大巴 -->
                      <template v-if="add_data.routeSimpleName == '送集合点大巴' ">
                        <el-form :model="add_data" label-width="110px" label-suffix="：">
                            <el-form-item label="行程简称" :required="false">
                                <el-select  @change="routeSimpleName_change" style="width: 200px;" 
                                    v-model="add_data.routeSimpleName" placeholder="请选择行程简称">
                                    <el-option v-for="(item, index) in routeSimpleName_list" :key="index" :label="item.label"
                                    :value="item.value">
                                </el-option>
                                </el-select>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="客户名称" :required="false">
                                        <el-select @change='cusCompany_change' clearable style="width: 200px;" filterable remote :filter-method="handleFilter"
                                            v-model="add_data.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                            :value="item.userId">
                                            <span style="float: left">{{ item.cusCompanyName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.cusPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="负责人" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="业务员" :required="false">
                                        <el-select clearable style="width: 200px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                            :value="item.ftUserId">
                                            <span style="float: left">{{ item.realName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{  '（' + item.loginPhone + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            
                              <!-- <el-form-item label="客户名称" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="handleFilter"
                                    v-model="add_data.userId" placeholder="请选择客户">
                                    <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                        :value="item.id">
                                        <span style="float: left">{{ item.cusCompanyName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="负责人" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                    v-model="add_data.useCarDutyUserId" placeholder="请选择负责人">
                                    <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item>
                              <el-form-item label="业务员" :required="false">
                                <el-select clearable style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                    v-model="add_data.serviceMan" placeholder="请选择业务员">
                                    <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                        :value="item.ftUserId">
                                        <span style="float: left">{{ item.realName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                    </el-option>
                                </el-select>
                            </el-form-item> -->
                            <div style="display:flex;">
                                <!-- <el-button @click="land_se_btn" style="margin-left:20px"
                                    type="primary">航班号自动查询</el-button> -->
                                <el-form-item label="送车时间" :required="false">
                                    <el-date-picker style=" width: 160px" value-format="YYYY-MM-DD HH:mm"
                                        format="YYYY-MM-DD HH:mm" v-model="add_data.flightDate" type="datetime"
                                        placeholder="请选择送车时间" />
                                        <el-input
                                        v-model="time_number1"
                                        @change='time_number_change1(2)'
                                        style="width: 260px;margin-left:10px"
                                        placeholder="时间转换,格式:1201转换时间为12:01"
                                        clearable
                                      />
                                </el-form-item>


                            </div>
                            <div style="display:flex;">
                                <el-form-item label="接人地址" :required="false">
                                    <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  style="width:220px" @change="bus_select_Btn2"
                                        v-model="add_data.fromLocation" class="m-2" placeholder="请选择接人地址"
                                        size="mini">
                                        <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                        :label="item.stationName" :value="item.stationName" >
                                        <span style="float: left">{{ item.stationName }}</span>
                                        <span style="
                                        float: right;
                                        color: var(--el-text-color-secondary);
                                        font-size: 13px;
                                      ">{{ '（' + item.address + '）' }}</span>
                                    </el-option>
                                    </el-select>
                                </el-form-item>
                                <el-button @click="bus_map_off_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px" type="primary">地图选址</el-button>
                            </div>

                            <template v-if="passing_points_list.length > 0">
                                <el-form-item v-for="(item, index) in passing_points_index" :key="index"
                                    label="途经地点：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div
                                            style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                            {{
                                           
                                                passing_points_list[index].name
                                            }}</div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="passing_points_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="删除途经">
                                                删除途经
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <div style="display:flex;width:40vw;">

                                <el-form-item label="送大巴地点" :required="false">
                                    <div @click="car_map_btn(1)">
                                        <!-- <el-input disabled style="width:220px" v-model="add_data.toLocation"
                                            placeholder="请选择送大巴地点" /> -->
                                            <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  style="width:220px" @change="bus_select_Btn1"
                                            v-model="add_data.toLocation" class="m-2" placeholder="请选择送大巴地点"
                                            size="mini">
                                            <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                            :label="item.stationName" :value="item.stationName" >
                                            <span style="float: left">{{ item.stationName }}</span>
                                            <span style="
                                            float: right;
                                            color: var(--el-text-color-secondary);
                                            font-size: 13px;
                                          ">{{ '（' + item.address + '）' }}</span>
                                        </el-option>
                                        </el-select>
                                    </div>
                                    <el-radio-group v-if="chartered_bus_off" v-model="aircraft_radio"
                                        style="margin-left:20px;">
                                        <el-radio label="拼车" size="large">拼车</el-radio>
                                        <el-radio label="包车" size="large">包车</el-radio>
                                    </el-radio-group>
                                    <el-button @click="bus_map_off_btn(2)" style="margin-left:30px;"
                                        type="primary">地图选址</el-button>
                                    <el-button v-if="aircraft_radio == '包车'" style="margin-left:30px;margin-bottom:0px"
                                        @click="add_passing_points(1)" type="warning">添加途经点</el-button>
                                </el-form-item>

                            </div>
                            <div v-if="aircraft_radio == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                            </div>
                            <el-form-item type="number" label="预约人数" :required="false">
                                <el-input style="width:220px" v-model="add_data.personNum"
                                    placeholder="请输入预约人数">
                                    <template #append>人</template></el-input>
                            </el-form-item>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                               
                                        <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                            placeholder="请选择指定车型" style="width: 160px;">
                                            <el-option label="不限车型" value="0"></el-option>
                                            <el-option label="5座" value="5"></el-option>
                                            <el-option label="7座" value="7"></el-option>
                                            <el-option label="9座" value="9"></el-option>
                                            <el-option label="12座" value="12"></el-option>
                                            <el-option label="14座" value="14"></el-option>
                                            <el-option label="17座" value="17"></el-option>
                                             <el-option label="23座" value="23"></el-option>
                                            <el-option label="30座" value="30"></el-option>
                                            <el-option label="39座" value="39"></el-option>
                                            <el-option label="49座" value="49"></el-option>
                                            <el-option label="55座" value="55"></el-option>

                                        </el-select></el-form-item>
                                </el-col>
                                <el-col :span="16">
                                    <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                               
                                        <el-select  v-model="add_data.carConfig" :filterable="false"
                                            placeholder="请选择车辆配置" style="width: 360px;">
                                            <!-- <el-option label="不限车型" value=""></el-option> -->
                                            <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                            :label="item.text+'('+ item.other+')'" :value="item.val" />

                                        </el-select>
                                    </el-form-item>
                                </el-col>
                              </el-row>
                            <div style="display:flex;" >
                                <el-form-item label="用车费用" :required="false">
                                    <el-input  @input="price_handleInput" type="number" style="width:220px" v-model="add_data.price"
                                        placeholder="请输入用车费用">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>
                            <!-- <el-form-item v-if="aircraft_radio != '拼车'" label="包车天数" :required="false">
                                <el-input style="width:220px" v-model="add_data.days" placeholder="请输入包车天数">
                                    <template #append>天</template></el-input>
                            </el-form-item>
                            <div style="display:flex;" v-if="aircraft_radio != '拼车'">
                                <el-form-item label="包车价格" :required="false">
                                    <el-input style="width:220px" v-model="add_data.price"
                                        placeholder="请输入包车价格">
                                        <template #append>元</template></el-input>
                                </el-form-item>

                                <el-button icon="PieChart" @click="price_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px"
                                    type="primary">自动计算价格</el-button>
                            </div>

                            <el-form-item v-if="aircraft_radio != '拼车'" label="是否走高速" :required="false">
                                <el-select v-model="add_data.isHighSpeed" :filterable="false"
                                    placeholder="请选择是否走高速" style="width: 220px;">
                                    <el-option label="走高速" value="1"></el-option>
                                    <el-option label="不走高速" value="0"></el-option>

                                </el-select>
                            </el-form-item> -->

                            <el-form-item label="联系人姓名" :required="false">
                                <el-input style="width:220px" v-model="add_data.cusName"
                                    placeholder="请输入联系人姓名" />
                            </el-form-item>
                            <div style="display:flex;">
                                <el-form-item type="number" label="联系人电话" :required="false">
                                    <el-input style="width:220px" v-model="add_data.cusMobile"
                                        placeholder="请输入联系人电话" />
                                </el-form-item>
                                <el-button v-if="aircraft_radio != '拼车'" @click="add_cusName_btn(1)"
                                    style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                            </div>
                            <template v-if="add_cusName_list.length > 0">
                                <el-form-item v-for="(item, index) in add_cusName_index" :key="index"
                                    label="联系人：">
                                    <!-- @click="choseMapPoint" -->
                                    <div style="display: flex;">
                                        <div style="display: flex;">
                                            <el-input style="width:220px" v-model="add_cusName_list[index].name"
                                                placeholder="请输入联系人姓名" />
                                            <el-input style="width:220px"
                                                v-model="add_cusName_list[index].mobile"
                                                placeholder="请输入联系人电话" />
                                        </div>

                                        <div style="margin-left: 40px;">
                                            <el-button @click="add_cusName_index_delbtn(index)" type="danger"
                                                icon="Close" plain size="mini" title="联系人">
                                                联系人
                                            </el-button>
                                        </div>
                                    </div>
                                </el-form-item>
                            </template>
                            <!-- <el-form-item label="是否返程" :required="false">
                                <el-select @change="isReturnAdd_change" style="width:220px"
                                    v-model="add_data.isReturn" placeholder="请选择是否返程">
                                    <el-option v-for="item in isReturn_list" :key="item.value"
                                        :label="item.label" :value="item.value" />
                                </el-select>
                            </el-form-item> -->
                         
                            <el-form-item label="驾驶员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入驾驶员备注" v-model="add_data.driverRemark" />
                            </el-form-item>
                            <el-form-item label="业务员备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                    placeholder="请输入业务员备注" v-model="add_data.serviceManRemark" />
                            </el-form-item>
                            <el-form-item label="客户备注" :required="false">
                                <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                    placeholder="请输入客户备注" v-model="add_data.remark" />
                            </el-form-item>
                            <!-- <el-collapse>
                                <el-collapse-item title="显示更多选填信息" name="1">

                                    <el-form-item label="备注" :required="false">
                                        <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                            placeholder="请输入备注" v-model="add_data.remark" />
                                    </el-form-item>
                                </el-collapse-item>

                            </el-collapse> -->

                        </el-form>
                    </template>
                 
                 <div style="display: flex;margin-left:30vw;margin-top:10px">
                    <el-button @click="ok_btn(1)"  type="primary">修改订单</el-button>
                    <!-- <el-button @click="ok_btn(2)"  type="primary">提交订单并付费</el-button> -->
              
                 </div>
                </div>
                <!-- 返程 -->
                <el-divider v-if="add_data.isReturn == 'true' || add_data.isReturn == '是'" style="height:70vh;"
                    direction="vertical" />
                <div style="margin-left:20px" v-if="add_data.isReturn == 'true' || add_data.isReturn == '是'"
                    :style="add_data.isReturn == 'true' || add_data.isReturn == '是' ? 'width:50%' : ''">
                    <!-- 飞机返程 -->
                    <div v-if="activeName_tabs1 == 'aircraft'">
                        <div style="font-size:20px;font-weight:700;">返程信息: <text
                                style="font-size:20px;font-weight:700;color:red ;">
                                {{ activeName_tabs2 == "aircraft_connect" ? '送飞机' : '接飞机' }}</text></div>
                        <div style="margin-top:40px;">
                            <div v-if="activeName_tabs2 == 'aircraft_connect'">
                                <el-form :model="add_data" label-width="110px" label-suffix="：">
                                    <!-- <el-form-item label="客户名称" :required="false">
                                        <el-select style="width: 400px;" filterable remote  :filter-method="handleFilter"
                                            v-model="add_data.returnOrder.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                                :value="item.id">
                                                <span style="float: left">{{ item.cusCompanyName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="负责人" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.returnOrder.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="业务员" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.returnOrder.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item> -->
                                    <div style="display:flex;">
                                        <el-button @click="land_se_btn(2)" style="margin-left:20px"
                                            type="primary">航班号自动查询</el-button>
                                        <el-form-item label="送机时间" :required="false">
                                            <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                                format="YYYY-MM-DD HH:mm" v-model="add_data.returnOrder.flightDate"
                                                type="datetime" placeholder="请选择送机时间" />
                                                <el-input
                                                v-model="time_number2"
                                                @change='time_number_change1(3)'
                                                style="width: 260px;margin-left:10px"
                                                placeholder="时间转换,格式:1201转换时间为12:01"
                                                clearable
                                              />
                                        </el-form-item>


                                    </div>
                                    <div style="display:flex;">
                                        <!-- <el-form-item label="接人地址" :required="false">
                                                <el-autocomplete v-model="add_data.fromLocation" :fetch-suggestions="toLocation_querySearch"
                                                    :trigger-on-focus="false" clearable class="inline-input w-50" placeholder="请输入接人地址"
                                                    @select="toLocation_handleSelect" />
                                            </el-form-item> -->
                                        <el-form-item label="接人地址" :required="false">
                                            <el-select style="width:220px"  :filter-method="stationNamehandleFilter" clearable filterable remote  @change="select_Btn2" v-model="add_data.returnOrder.fromLocation"
                                                class="m-2" placeholder="请输入接人地址" size="mini">
                                                <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                                        :label="item.stationName" :value="item.stationName" >
                                                        <span style="float: left">{{ item.stationName }}</span>
                                                        <span style="
                                                        float: right;
                                                        color: var(--el-text-color-secondary);
                                                        font-size: 13px;
                                                      ">{{ '（' + item.address + '）' }}</span>
                                                    </el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-button @click="map_off_btn(2)" style="margin-left:30px;margin-bottom:10px"
                                            type="primary">地图选址</el-button>


                                    </div>
                                    <template v-if="passing_points_list2.length > 0">
                                        <el-form-item v-for="(item, index) in passing_points_index2" :key="index"
                                            label="途经地点：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div
                                                    style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                                    {{
                                                        passing_points_list2[index].area + '-' +
                                                        passing_points_list2[index].name
                                                    }}</div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="passing_points_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="删除途经">
                                                        删除途经
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                    <div style="display:flex;">
                                        <el-form-item label="送机地点" :required="false">
                                            <el-select style="width:220px" @change="aircraft_connect_change2"
                                                v-model="add_data.returnOrder.toLocation" placeholder="请选择送机地点" clearable>
                                                <el-option v-for="item in aircraft_list" :key="item.id"
                                                    :label="item.station_name" :value="item.station_name" />
                                            </el-select>
                                            <el-radio-group v-if="chartered_bus_off2" v-model="aircraft_radio2"
                                                style="margin-left:20px;">
                                                <el-radio label="包车" size="large">包车</el-radio>
                                                <el-radio label="拼车" size="large">拼车</el-radio>

                                            </el-radio-group>
                                            <el-button v-if="aircraft_radio2 == '包车'" style="margin-left:30px;margin-bottom:0px"
                                                @click="add_passing_points(2)" type="warning">添加途经点</el-button>
                                        </el-form-item>

                                    </div>
                                    <div v-if="aircraft_radio2 == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                                    </div>
                                    <el-form-item type="number" label="预约人数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.personNum"
                                            placeholder="请输入预约人数">
                                            <template #append>人</template></el-input>
                                    </el-form-item>

                                    <el-row>
                                        <el-col :span="8">
                                            <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                                       
                                                <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                                    placeholder="请选择指定车型" style="width: 160px;">
                                                    <el-option label="不限车型" value="0"></el-option>
                                                    <el-option label="5座" value="5"></el-option>
                                                    <el-option label="7座" value="7"></el-option>
                                                    <el-option label="9座" value="9"></el-option>
                                                    <el-option label="12座" value="12"></el-option>
                                                    <el-option label="14座" value="14"></el-option>
                                                    <el-option label="17座" value="17"></el-option>
                                                     <el-option label="23座" value="23"></el-option>
                                                    <el-option label="30座" value="30"></el-option>
                                                    <el-option label="39座" value="39"></el-option>
                                                    <el-option label="49座" value="49"></el-option>
                                                    <el-option label="55座" value="55"></el-option>
    
                                                </el-select></el-form-item>
                                        </el-col>
                                        <el-col :span="16">
                                            <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                                       
                                                <el-select  v-model="add_data.carConfig" :filterable="false"
                                                    placeholder="请选择车辆配置" style="width: 360px;">
                                                    <!-- <el-option label="不限车型" value=""></el-option> -->
                                                    <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                                    :label="item.text+'('+ item.other+')'" :value="item.val" />
    
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                      </el-row>
                           
                                    <!-- <el-form-item v-if="aircraft_radio2 != '拼车'" label="包车天数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.days"
                                            placeholder="请输入包车天数">
                                            <template #append>天</template></el-input>
                                    </el-form-item>
                                    <div style="display:flex;" v-if="aircraft_radio2 != '拼车'">
                                        <el-form-item label="包车价格" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.price"
                                                placeholder="请输入包车价格">
                                                <template #append>元</template></el-input>
                                        </el-form-item>

                                        <el-button icon="PieChart" @click="price_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="primary">自动计算价格</el-button>
                                   
                                        </div>

                                    <el-form-item v-if="aircraft_radio2 != '拼车'" label="是否走高速" :required="false">
                                        <el-select v-model="add_data.returnOrder.isHighSpeed" :filterable="false"
                                            placeholder="请选择是否走高速" style="width: 220px;">
                                            <el-option label="走高速" value="1"></el-option>
                                            <el-option label="不走高速" value="0"></el-option>

                                        </el-select>
                                    </el-form-item> -->

                                    <el-form-item label="联系人姓名" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.cusName"
                                            placeholder="请输入联系人姓名" />
                                    </el-form-item>
                                    <div style="display:flex">
                                        <el-form-item type="number" label="联系人电话" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.cusMobile"
                                                placeholder="请输入联系人电话" />
                                        </el-form-item>
                                        <el-button v-if="aircraft_radio2 != '拼车'" @click="add_cusName_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                                    </div>
                                    <template v-if="add_cusName_list2.length > 0">
                                        <el-form-item v-for="(item, index) in add_cusName_index2" :key="index" label="联系人：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div style="display: flex;">
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].name"
                                                        placeholder="请输入联系人姓名" />
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].mobile"
                                                        placeholder="请输入联系人电话" />
                                                </div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="add_cusName_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="联系人">
                                                        联系人
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                  
                                    <el-form-item label="驾驶员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入驾驶员备注" v-model="add_data.returnOrder.driverRemark" />
                                    </el-form-item>
                                    <el-form-item label="业务员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入业务员备注" v-model="add_data.returnOrder.serviceManRemark" />
                                    </el-form-item>
                                    <el-form-item label="客户备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                            placeholder="请输入客户备注" v-model="add_data.returnOrder.remark" />
                                    </el-form-item>
                                    <!-- <el-collapse>
                                        <el-collapse-item title="显示更多选填信息" name="1">
    
                                            <el-form-item label="备注" :required="false">
                                                <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                                    placeholder="请输入备注" v-model="add_data.returnOrder.remark" />
                                            </el-form-item>
                                        </el-collapse-item>
    
                                    </el-collapse> -->
                                </el-form>

                              
                            </div>
                            <div v-if="activeName_tabs2 == 'aircraft_deliver'">
                                <el-form :model="add_data" label-width="110px" label-suffix="：">
                                    <!-- <el-form-item label="客户名称" :required="false">
                                        <el-select style="width: 400px;" filterable remote  :filter-method="handleFilter"
                                            v-model="add_data.returnOrder.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                                :value="item.id">
                                                <span style="float: left">{{ item.cusCompanyName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="负责人" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.returnOrder.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="业务员" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.returnOrder.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item> -->
                                    <div style="display:flex;">
                                        <el-button @click="land_se_btn(2)" style="margin-left:20px"
                                            type="primary">航班号自动查询</el-button>
                                        <el-form-item label="接机时间" :required="false">
                                            <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                                format="YYYY-MM-DD HH:mm" v-model="add_data.returnOrder.landDate"
                                                type="datetime" placeholder="请选择接机时间" />
                                                <el-input
                                                v-model="time_number2"
                                                @change='time_number_change1(4)'
                                                style="width: 260px;margin-left:10px"
                                                placeholder="时间转换,格式:1201转换时间为12:01"
                                                clearable
                                              />
                                        </el-form-item>


                                    </div>
                                    <div style="display:flex;">
                                        <el-form-item label="接机地点" :required="false">
                                            <el-select style="width:220px" @change="aircraft_connect_change2"
                                                v-model="add_data.returnOrder.fromLocation" placeholder="请选择接机地点" clearable>
                                                <el-option v-for="item in aircraft_list" :key="item.id"
                                                    :label="item.station_name" :value="item.station_name" />
                                            </el-select>
                                            <el-radio-group v-if="chartered_bus_off2" v-model="aircraft_radio2"
                                                style="margin-left:20px;">
                                                <el-radio label="包车" size="large">包车</el-radio>
                                                <el-radio label="拼车" size="large">拼车</el-radio>

                                            </el-radio-group>
                                            <el-button v-if="aircraft_radio2 == '包车'" style="margin-left:30px;margin-bottom:0px"
                                                @click="add_passing_points(2)" type="warning">添加途经点</el-button>
                                        </el-form-item>

                                    </div>
                                    <div v-if="aircraft_radio2 == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                                    </div>
                                    <template v-if="passing_points_list2.length > 0">
                                        <el-form-item v-for="(item, index) in passing_points_index2" :key="index"
                                            label="途经地点：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div
                                                    style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                                    {{
                                                        passing_points_list2[index].area + '-' +
                                                        passing_points_list2[index].name
                                                    }}</div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="passing_points_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="删除途经">
                                                        删除途经
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                    <div style="display:flex;">

                                        <el-form-item label="送人地址" :required="false">
                                            <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  @change="select_Btn2" v-model="add_data.returnOrder.toLocation"
                                                class="m-2" placeholder="请输入送人地址" size="mini">
                                                <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                                        :label="item.stationName" :value="item.stationName" >
                                                        <span style="float: left">{{ item.stationName }}</span>
                                                        <span style="
                                                        float: right;
                                                        color: var(--el-text-color-secondary);
                                                        font-size: 13px;
                                                      ">{{ '（' + item.address + '）' }}</span>
                                                    </el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-button @click="map_off_btn(2)" style="margin-left:30px;margin-bottom:10px"
                                            type="primary">地图选址</el-button>


                                    </div>


                                    <el-form-item type="number" label="预约人数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.personNum"
                                            placeholder="请输入预约人数">
                                            <template #append>人</template></el-input>
                                    </el-form-item>

                                    <el-row>
                                        <el-col :span="8">
                                            <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                                       
                                                <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                                    placeholder="请选择指定车型" style="width: 160px;">
                                                    <el-option label="不限车型" value="0"></el-option>
                                                    <el-option label="5座" value="5"></el-option>
                                                    <el-option label="7座" value="7"></el-option>
                                                    <el-option label="9座" value="9"></el-option>
                                                    <el-option label="12座" value="12"></el-option>
                                                    <el-option label="14座" value="14"></el-option>
                                                    <el-option label="17座" value="17"></el-option>
                                                     <el-option label="23座" value="23"></el-option>
                                                    <el-option label="30座" value="30"></el-option>
                                                    <el-option label="39座" value="39"></el-option>
                                                    <el-option label="49座" value="49"></el-option>
                                                    <el-option label="55座" value="55"></el-option>
    
                                                </el-select></el-form-item>
                                        </el-col>
                                        <el-col :span="16">
                                            <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                                       
                                                <el-select  v-model="add_data.carConfig" :filterable="false"
                                                    placeholder="请选择车辆配置" style="width: 360px;">
                                                    <!-- <el-option label="不限车型" value=""></el-option> -->
                                                    <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                                    :label="item.text+'('+ item.other+')'" :value="item.val" />
    
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                      </el-row>
                                    <!-- <el-form-item v-if="aircraft_radio2 != '拼车'" label="包车天数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.days"
                                            placeholder="请输入包车天数">
                                            <template #append>天</template></el-input>
                                    </el-form-item>
                                    <div style="display:flex;" v-if="aircraft_radio2 != '拼车'">
                                        <el-form-item label="包车价格" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.price"
                                                placeholder="请输入包车价格">
                                                <template #append>元</template></el-input>
                                        </el-form-item>

                                        <el-button icon="PieChart" @click="price_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="primary">自动计算价格</el-button>
                                    </div>

                                    <el-form-item v-if="aircraft_radio2 != '拼车'" label="是否走高速" :required="false">
                                        <el-select v-model="add_data.returnOrder.isHighSpeed" :filterable="false"
                                            placeholder="请选择是否走高速" style="width: 220px;">
                                            <el-option label="走高速" value="1"></el-option>
                                            <el-option label="不走高速" value="0"></el-option>

                                        </el-select>
                                    </el-form-item> -->

                                    <el-form-item label="联系人姓名" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.cusName"
                                            placeholder="请输入联系人姓名" />
                                    </el-form-item>
                                    <div style="display:flex">
                                        <el-form-item type="number" label="联系人电话" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.cusMobile"
                                                placeholder="请输入联系人电话" />
                                        </el-form-item>
                                        <el-button v-if="aircraft_radio2 != '拼车'" @click="add_cusName_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                                    </div>
                                    <template v-if="add_cusName_list2.length > 0">
                                        <el-form-item v-for="(item, index) in add_cusName_index2" :key="index" label="联系人：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div style="display: flex;">
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].name"
                                                        placeholder="请输入联系人姓名" />
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].mobile"
                                                        placeholder="请输入联系人电话" />
                                                </div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="add_cusName_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="联系人">
                                                        联系人
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                 
                                    <el-form-item label="驾驶员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入驾驶员备注" v-model="add_data.returnOrder.driverRemark" />
                                    </el-form-item>
                                    <el-form-item label="业务员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入业务员备注" v-model="add_data.returnOrder.serviceManRemark" />
                                    </el-form-item>
                                    <el-form-item label="客户备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                            placeholder="请输入客户备注" v-model="add_data.returnOrder.remark" />
                                    </el-form-item>
                                    <!-- <el-collapse>
                                        <el-collapse-item title="显示更多选填信息" name="1">
    
                                            <el-form-item label="备注" :required="false">
                                                <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                                    placeholder="请输入备注" v-model="add_data.returnOrder.remark" />
                                            </el-form-item>
                                        </el-collapse-item>
    
                                    </el-collapse> -->
                                </el-form>
                              
                            </div>
                        </div>
                    </div>

                    <!-- 火车返程 -->
                    <div v-if="activeName_tabs1 == 'train'">
                        <div style="font-size:20px;font-weight:700;">返程信息: <text
                                style="font-size:20px;font-weight:700;color:red ;">
                                {{ activeName_tabs2 == "aircraft_connect" ? '送火车' : '接火车' }}</text></div>
                        <div style="margin-top:40px;">
                            <div v-if="activeName_tabs2 == 'aircraft_connect'">
                                <el-form :model="add_data" label-width="110px" label-suffix="：">
                                    <!-- <el-form-item label="客户名称" :required="false">
                                        <el-select style="width: 400px;" filterable remote  :filter-method="handleFilter"
                                            v-model="add_data.returnOrder.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                                :value="item.id">
                                                <span style="float: left">{{ item.cusCompanyName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="负责人" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.returnOrder.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="业务员" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.returnOrder.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item> -->
                                    <div style="display:flex;">
                                        <el-button @click="train_se_btn(2)" style="margin-left:20px"
                                            type="primary">列车号自动查询</el-button>
                                        <el-form-item label="送火车时间" :required="false">
                                            <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                                format="YYYY-MM-DD HH:mm" v-model="add_data.returnOrder.flightDate"
                                                type="datetime" placeholder="请选择火车时间" />
                                                <el-input
                                                v-model="time_number2"
                                                @change='time_number_change1(3)'
                                                style="width: 260px;margin-left:10px"
                                                placeholder="时间转换,格式:1201转换时间为12:01"
                                                clearable
                                              />
                                        </el-form-item>


                                    </div>
                                    <div style="display:flex;">
                                        <!-- <el-form-item label="接人地址" :required="false">
                                                <el-autocomplete v-model="add_data.fromLocation" :fetch-suggestions="toLocation_querySearch"
                                                    :trigger-on-focus="false" clearable class="inline-input w-50" placeholder="请输入接人地址"
                                                    @select="toLocation_handleSelect" />
                                            </el-form-item> -->
                                        <el-form-item label="接人地址" :required="false">
                                            <el-select style="width:220px"  :filter-method="stationNamehandleFilter" clearable filterable remote  @change="select_Btn2" v-model="add_data.returnOrder.fromLocation"
                                                class="m-2" placeholder="请输入接人地址" size="mini">
                                                <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                                :label="item.stationName" :value="item.stationName" >
                                                <span style="float: left">{{ item.stationName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ '（' + item.address + '）' }}</span>
                                            </el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-button @click="map_off_btn(2)" style="margin-left:30px;margin-bottom:10px"
                                            type="primary">地图选址</el-button>


                                    </div>
                                    <template v-if="passing_points_list2.length > 0">
                                        <el-form-item v-for="(item, index) in passing_points_index2" :key="index"
                                            label="途经地点：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div
                                                    style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                                    {{
                                                        passing_points_list2[index].area + '-' +
                                                        passing_points_list2[index].name
                                                    }}</div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="passing_points_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="删除途经">
                                                        删除途经
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                    <div style="display:flex;">
                                        <el-form-item label="送火车地点" :required="false">
                                            <el-select style="width:220px" @change="aircraft_connect_change2"
                                                v-model="add_data.returnOrder.toLocation" placeholder="请选择送火车地点" clearable>
                                                <el-option v-for="item in train_list" :key="item.id"
                                                    :label="item.station_name" :value="item.station_name" />
                                            </el-select>
                                            <el-radio-group v-if="chartered_bus_off2" v-model="aircraft_radio2"
                                                style="margin-left:20px;">
                                                <el-radio label="包车" size="large">包车</el-radio>
                                                <el-radio label="拼车" size="large">拼车</el-radio>

                                            </el-radio-group>
                                            <el-button v-if="aircraft_radio2 == '包车'" style="margin-left:30px;margin-bottom:0px"
                                                @click="add_passing_points(2)" type="warning">添加途经点</el-button>
                                        </el-form-item>

                                    </div>
                                    <div v-if="aircraft_radio2 == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                                    </div>
                                    <el-form-item type="number" label="预约人数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.personNum"
                                            placeholder="请输入预约人数">
                                            <template #append>人</template></el-input>
                                    </el-form-item>

                                    <el-row>
                                        <el-col :span="8">
                                            <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                                       
                                                <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                                    placeholder="请选择指定车型" style="width: 160px;">
                                                    <el-option label="不限车型" value="0"></el-option>
                                                    <el-option label="5座" value="5"></el-option>
                                                    <el-option label="7座" value="7"></el-option>
                                                    <el-option label="9座" value="9"></el-option>
                                                    <el-option label="12座" value="12"></el-option>
                                                    <el-option label="14座" value="14"></el-option>
                                                    <el-option label="17座" value="17"></el-option>
                                                     <el-option label="23座" value="23"></el-option>
                                                    <el-option label="30座" value="30"></el-option>
                                                    <el-option label="39座" value="39"></el-option>
                                                    <el-option label="49座" value="49"></el-option>
                                                    <el-option label="55座" value="55"></el-option>
    
                                                </el-select></el-form-item>
                                        </el-col>
                                        <el-col :span="16">
                                            <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                                       
                                                <el-select  v-model="add_data.carConfig" :filterable="false"
                                                    placeholder="请选择车辆配置" style="width: 360px;">
                                                    <!-- <el-option label="不限车型" value=""></el-option> -->
                                                    <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                                    :label="item.text+'('+ item.other+')'" :value="item.val" />
    
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                      </el-row>
                                    <!-- <el-form-item v-if="aircraft_radio2 != '拼车'" label="包车天数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.days"
                                            placeholder="请输入包车天数">
                                            <template #append>天</template></el-input>
                                    </el-form-item>
                                    <div style="display:flex;" v-if="aircraft_radio2 != '拼车'">
                                        <el-form-item label="包车价格" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.price"
                                                placeholder="请输入包车价格">
                                                <template #append>元</template></el-input>
                                        </el-form-item>

                                        <el-button icon="PieChart" @click="price_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="primary">自动计算价格</el-button>
                                    </div>

                                    <el-form-item v-if="aircraft_radio2 != '拼车'" label="是否走高速" :required="false">
                                        <el-select v-model="add_data.returnOrder.isHighSpeed" :filterable="false"
                                            placeholder="请选择是否走高速" style="width: 220px;">
                                            <el-option label="走高速" value="1"></el-option>
                                            <el-option label="不走高速" value="0"></el-option>

                                        </el-select>
                                    </el-form-item> -->

                                    <el-form-item label="联系人姓名" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.cusName"
                                            placeholder="请输入联系人姓名" />
                                    </el-form-item>
                                    <div style="display:flex">
                                        <el-form-item type="number" label="联系人电话" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.cusMobile"
                                                placeholder="请输入联系人电话" />
                                        </el-form-item>
                                        <el-button v-if="aircraft_radio2 != '拼车'" @click="add_cusName_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                                    </div>
                                    <template v-if="add_cusName_list2.length > 0">
                                        <el-form-item v-for="(item, index) in add_cusName_index2" :key="index" label="联系人：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div style="display: flex;">
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].name"
                                                        placeholder="请输入联系人姓名" />
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].mobile"
                                                        placeholder="请输入联系人电话" />
                                                </div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="add_cusName_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="联系人">
                                                        联系人
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                  
                                    <el-form-item label="驾驶员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入驾驶员备注" v-model="add_data.returnOrder.driverRemark" />
                                    </el-form-item>
                                    <el-form-item label="业务员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入业务员备注" v-model="add_data.returnOrder.serviceManRemark" />
                                    </el-form-item>
                                    <el-form-item label="客户备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                            placeholder="请输入客户备注" v-model="add_data.returnOrder.remark" />
                                    </el-form-item>
                                    <!-- <el-collapse>
                                        <el-collapse-item title="显示更多选填信息" name="1">
    
                                            <el-form-item label="备注" :required="false">
                                                <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                                    placeholder="请输入备注" v-model="add_data.returnOrder.remark" />
                                            </el-form-item>
                                        </el-collapse-item>
    
                                    </el-collapse> -->
                                </el-form>
                           
                            </div>
                            <div v-if="activeName_tabs2 == 'aircraft_deliver'">
                                <el-form :model="add_data" label-width="110px" label-suffix="：">
                                    <!-- <el-form-item label="客户名称" :required="false">
                                        <el-select style="width: 400px;" filterable remote  :filter-method="handleFilter"
                                            v-model="add_data.returnOrder.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                                :value="item.id">
                                                <span style="float: left">{{ item.cusCompanyName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="负责人" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.returnOrder.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="业务员" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.returnOrder.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item> -->
                                    <div style="display:flex;">
                                        <el-button @click="train_se_btn(2)" style="margin-left:20px"
                                            type="primary">列车号自动查询</el-button>
                                        <el-form-item label="接火车时间" :required="false">
                                            <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                                format="YYYY-MM-DD HH:mm" v-model="add_data.returnOrder.landDate"
                                                type="datetime" placeholder="请选择接火车时间" />
                                                <el-input
                                                v-model="time_number2"
                                                @change='time_number_change1(4)'
                                                style="width: 260px;margin-left:10px"
                                                placeholder="时间转换,格式:1201转换时间为12:01"
                                                clearable
                                              />
                                        </el-form-item>


                                    </div>
                                    <div style="display:flex;">
                                        <el-form-item label="接火车地点" :required="false">
                                            <el-select style="width:220px" @change="aircraft_connect_change2"
                                                v-model="add_data.returnOrder.fromLocation" placeholder="请选择接火车地点"
                                                clearable>
                                                <el-option v-for="item in train_list" :key="item.id"
                                                    :label="item.station_name" :value="item.station_name" />
                                            </el-select>
                                            <el-radio-group v-if="chartered_bus_off2" v-model="aircraft_radio2"
                                                style="margin-left:20px;">
                                                <el-radio label="包车" size="large">包车</el-radio>
                                                <el-radio label="拼车" size="large">拼车</el-radio>

                                            </el-radio-group>
                                            <el-button v-if="aircraft_radio2 == '包车'" style="margin-left:30px;margin-bottom:0px"
                                                @click="add_passing_points(2)" type="warning">添加途经点</el-button>
                                        </el-form-item>

                                    </div>
                                    <div v-if="aircraft_radio2 == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                                    </div>
                                    <template v-if="passing_points_list2.length > 0">
                                        <el-form-item v-for="(item, index) in passing_points_index2" :key="index"
                                            label="途经地点：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div
                                                    style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                                    {{
                                                        passing_points_list2[index].area + '-' +
                                                        passing_points_list2[index].name
                                                    }}</div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="passing_points_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="删除途经">
                                                        删除途经
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                    <div style="display:flex;">

                                        <el-form-item label="送人地址" :required="false">
                                            <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  @change="select_Btn2" v-model="add_data.returnOrder.toLocation"
                                                class="m-2" placeholder="请输入送人地址" size="mini">
                                                <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                                :label="item.stationName" :value="item.stationName" >
                                                <span style="float: left">{{ item.stationName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ '（' + item.address + '）' }}</span>
                                            </el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-button @click="map_off_btn(2)" style="margin-left:30px;margin-bottom:10px"
                                            type="primary">地图选址</el-button>


                                    </div>


                                    <el-form-item type="number" label="预约人数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.personNum"
                                            placeholder="请输入预约人数">
                                            <template #append>人</template></el-input>
                                    </el-form-item>

                                    <el-row>
                                        <el-col :span="8">
                                            <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                                       
                                                <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                                    placeholder="请选择指定车型" style="width: 160px;">
                                                    <el-option label="不限车型" value="0"></el-option>
                                                    <el-option label="5座" value="5"></el-option>
                                                    <el-option label="7座" value="7"></el-option>
                                                    <el-option label="9座" value="9"></el-option>
                                                    <el-option label="12座" value="12"></el-option>
                                                    <el-option label="14座" value="14"></el-option>
                                                    <el-option label="17座" value="17"></el-option>
                                                     <el-option label="23座" value="23"></el-option>
                                                    <el-option label="30座" value="30"></el-option>
                                                    <el-option label="39座" value="39"></el-option>
                                                    <el-option label="49座" value="49"></el-option>
                                                    <el-option label="55座" value="55"></el-option>
    
                                                </el-select></el-form-item>
                                        </el-col>
                                        <el-col :span="16">
                                            <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                                       
                                                <el-select  v-model="add_data.carConfig" :filterable="false"
                                                    placeholder="请选择车辆配置" style="width: 360px;">
                                                    <!-- <el-option label="不限车型" value=""></el-option> -->
                                                    <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                                    :label="item.text+'('+ item.other+')'" :value="item.val" />
    
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                      </el-row>
                                    <!-- <el-form-item v-if="aircraft_radio2 != '拼车'" label="包车天数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.days"
                                            placeholder="请输入包车天数">
                                            <template #append>天</template></el-input>
                                    </el-form-item>
                                    <div style="display:flex;" v-if="aircraft_radio2 != '拼车'">
                                        <el-form-item label="包车价格" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.price"
                                                placeholder="请输入包车价格">
                                                <template #append>元</template></el-input>
                                        </el-form-item>

                                        <el-button icon="PieChart" @click="price_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="primary">自动计算价格</el-button>
                                    </div>

                                    <el-form-item v-if="aircraft_radio2 != '拼车'" label="是否走高速" :required="false">
                                        <el-select v-model="add_data.returnOrder.isHighSpeed" :filterable="false"
                                            placeholder="请选择是否走高速" style="width: 220px;">
                                            <el-option label="走高速" value="1"></el-option>
                                            <el-option label="不走高速" value="0"></el-option>

                                        </el-select>
                                    </el-form-item> -->

                                    <el-form-item label="联系人姓名" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.cusName"
                                            placeholder="请输入联系人姓名" />
                                    </el-form-item>
                                    <div style="display:flex">
                                        <el-form-item type="number" label="联系人电话" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.cusMobile"
                                                placeholder="请输入联系人电话" />
                                        </el-form-item>
                                        <el-button v-if="aircraft_radio2 != '拼车'" @click="add_cusName_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                                    </div>
                                    <template v-if="add_cusName_list2.length > 0">
                                        <el-form-item v-for="(item, index) in add_cusName_index2" :key="index" label="联系人：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div style="display: flex;">
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].name"
                                                        placeholder="请输入联系人姓名" />
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].mobile"
                                                        placeholder="请输入联系人电话" />
                                                </div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="add_cusName_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="联系人">
                                                        联系人
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                  
                                    <el-form-item label="驾驶员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入驾驶员备注" v-model="add_data.returnOrder.driverRemark" />
                                    </el-form-item>
                                    <el-form-item label="业务员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入业务员备注" v-model="add_data.returnOrder.serviceManRemark" />
                                    </el-form-item>
                                    <el-form-item label="客户备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                            placeholder="请输入客户备注" v-model="add_data.returnOrder.remark" />
                                    </el-form-item>
                                    <!-- <el-collapse>
                                        <el-collapse-item title="显示更多选填信息" name="1">
    
                                            <el-form-item label="备注" :required="false">
                                                <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                                    placeholder="请输入备注" v-model="add_data.returnOrder.remark" />
                                            </el-form-item>
                                        </el-collapse-item>
    
                                    </el-collapse> -->
                                </el-form>
                              
                            </div>
                        </div>
                    </div>

                    <!-- 返程大巴 -->
                    <div v-if="activeName_tabs1 == 'bus'">
                        <div style="font-size:20px;font-weight:700;">返程信息: <text
                                style="font-size:20px;font-weight:700;color:red ;">
                                {{ activeName_tabs2 == "aircraft_connect" ? '送大巴' : '接大巴' }}</text></div>
                        <div style="margin-top:40px;">
                            <div v-if="activeName_tabs2 == 'aircraft_connect'">
                                <el-form :model="add_data" label-width="110px" label-suffix="：">
                                    <!-- <el-form-item label="客户名称" :required="false">
                                        <el-select style="width: 400px;" filterable remote  :filter-method="handleFilter"
                                            v-model="add_data.returnOrder.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                                :value="item.id">
                                                <span style="float: left">{{ item.cusCompanyName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="负责人" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.returnOrder.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="业务员" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.returnOrder.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item> -->
                                    <div style="display:flex;">
                                        <!-- <el-button @click="land_se_btn(2)" style="margin-left:20px"
                                            type="primary">航班号自动查询</el-button> -->
                                        <el-form-item label="送大巴时间" :required="false">
                                            <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                                format="YYYY-MM-DD HH:mm" v-model="add_data.returnOrder.flightDate"
                                                type="datetime" placeholder="请选择送大巴时间" />
                                                <el-input
                                                v-model="time_number2"
                                                @change='time_number_change1(3)'
                                                style="width: 260px;margin-left:10px"
                                                placeholder="时间转换,格式:1201转换时间为12:01"
                                                clearable
                                              />
                                        </el-form-item>


                                    </div>
                                    <div style="display:flex;">

                                        <el-form-item label="接人地址" :required="false">
                                            <el-select  :filter-method="stationNamehandleFilter" clearable filterable remote  style="width:220px" @change="select_Btn2"
                                                v-model="add_data.returnOrder.fromLocation" class="m-2"
                                                placeholder="请选择接人地址" size="mini">
                                                <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                                        :label="item.stationName" :value="item.stationName" >
                                                        <span style="float: left">{{ item.stationName }}</span>
                                                        <span style="
                                                        float: right;
                                                        color: var(--el-text-color-secondary);
                                                        font-size: 13px;
                                                      ">{{ '（' + item.address + '）' }}</span>
                                                    </el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-button @click="bus_map_off_btn(3)" style="margin-left:30px;"
                                            type="primary">地图选址</el-button>


                                    </div>
                                    <template v-if="passing_points_list2.length > 0">
                                        <el-form-item v-for="(item, index) in passing_points_index2" :key="index"
                                            label="途经地点：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div
                                                    style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                                    {{
                                                        passing_points_list2[index].area + '-' +
                                                        passing_points_list2[index].name
                                                    }}</div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="passing_points_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="删除途经">
                                                        删除途经
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                    <div style="display:flex;">
                                        <el-form-item label="送大巴地址" :required="false">
                                            <div @click="car_map_btn(2)">
                                                <el-input disabled style="width:220px"
                                                    v-model="add_data.returnOrder.toLocation" placeholder="请选择送大巴地址" />
                                            </div>

                                            <el-radio-group v-if="chartered_bus_off2" v-model="aircraft_radio2"
                                                style="margin-left:20px;">
                                                <el-radio label="拼车" size="large">拼车</el-radio>
                                                <el-radio label="包车" size="large">包车</el-radio>
                                            </el-radio-group>
                                            <el-button @click="bus_map_off_btn(4)" style="margin-left:30px;"
                                                type="primary">地图选址</el-button>
                                            <el-button v-if="aircraft_radio2 == '包车'" style="margin-left:30px;margin-bottom:0px"
                                                @click="add_passing_points(2)" type="warning">添加途经点</el-button>
                                        </el-form-item>

                                    </div>
                                    <div v-if="aircraft_radio2 == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                                    </div>
                                    <el-form-item type="number" label="预约人数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.personNum"
                                            placeholder="请输入预约人数">
                                            <template #append>人</template></el-input>
                                    </el-form-item>

                                    <el-row>
                                        <el-col :span="8">
                                            <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                                       
                                                <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                                    placeholder="请选择指定车型" style="width: 160px;">
                                                    <el-option label="不限车型" value="0"></el-option>
                                                    <el-option label="5座" value="5"></el-option>
                                                    <el-option label="7座" value="7"></el-option>
                                                    <el-option label="9座" value="9"></el-option>
                                                    <el-option label="12座" value="12"></el-option>
                                                    <el-option label="14座" value="14"></el-option>
                                                    <el-option label="17座" value="17"></el-option>
                                                     <el-option label="23座" value="23"></el-option>
                                                    <el-option label="30座" value="30"></el-option>
                                                    <el-option label="39座" value="39"></el-option>
                                                    <el-option label="49座" value="49"></el-option>
                                                    <el-option label="55座" value="55"></el-option>
    
                                                </el-select></el-form-item>
                                        </el-col>
                                        <el-col :span="16">
                                            <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                                       
                                                <el-select  v-model="add_data.carConfig" :filterable="false"
                                                    placeholder="请选择车辆配置" style="width: 360px;">
                                                    <!-- <el-option label="不限车型" value=""></el-option> -->
                                                    <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                                    :label="item.text+'('+ item.other+')'" :value="item.val" />
    
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                      </el-row>
                                    <!-- <el-form-item v-if="aircraft_radio2 != '拼车'" label="包车天数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.days"
                                            placeholder="请输入包车天数">
                                            <template #append>天</template></el-input>
                                    </el-form-item>
                                    <div style="display:flex;" v-if="aircraft_radio2 != '拼车'">
                                        <el-form-item label="包车价格" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.price"
                                                placeholder="请输入包车价格">
                                                <template #append>元</template></el-input>
                                        </el-form-item>

                                        <el-button icon="PieChart" @click="price_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="primary">自动计算价格</el-button>
                                    </div>

                                    <el-form-item v-if="aircraft_radio2 != '拼车'" label="是否走高速" :required="false">
                                        <el-select v-model="add_data.returnOrder.isHighSpeed" :filterable="false"
                                            placeholder="请选择是否走高速" style="width: 220px;">
                                            <el-option label="走高速" value="1"></el-option>
                                            <el-option label="不走高速" value="0"></el-option>

                                        </el-select>
                                    </el-form-item> -->

                                    <el-form-item label="联系人姓名" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.cusName"
                                            placeholder="请输入联系人姓名" />
                                    </el-form-item>
                                    <div style="display:flex">
                                        <el-form-item type="number" label="联系人电话" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.cusMobile"
                                                placeholder="请输入联系人电话" />
                                        </el-form-item>
                                        <el-button v-if="aircraft_radio2 != '拼车'" @click="add_cusName_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                                    </div>
                                    <template v-if="add_cusName_list2.length > 0">
                                        <el-form-item v-for="(item, index) in add_cusName_index2" :key="index" label="联系人：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div style="display: flex;">
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].name"
                                                        placeholder="请输入联系人姓名" />
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].mobile"
                                                        placeholder="请输入联系人电话" />
                                                </div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="add_cusName_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="联系人">
                                                        联系人
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                   
                                    <el-form-item label="驾驶员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入驾驶员备注" v-model="add_data.returnOrder.driverRemark" />
                                    </el-form-item>
                                    <el-form-item label="业务员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入业务员备注" v-model="add_data.returnOrder.serviceManRemark" />
                                    </el-form-item>
                                    <el-form-item label="客户备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                            placeholder="请输入客户备注" v-model="add_data.returnOrder.remark" />
                                    </el-form-item>
                                    <!-- <el-collapse>
                                        <el-collapse-item title="显示更多选填信息" name="1">
    
                                            <el-form-item label="备注" :required="false">
                                                <el-input show-word-limit maxlength="200" :rows="4" type="textarea"
                                                    placeholder="请输入备注" v-model="add_data.returnOrder.remark" />
                                            </el-form-item>
                                        </el-collapse-item>
    
                                    </el-collapse> -->
                                </el-form>
                            
                            </div>
                            <div v-if="activeName_tabs2 == 'aircraft_deliver'">
                                <el-form :model="add_data" label-width="110px" label-suffix="：">
                                    <!-- <el-form-item label="客户名称" :required="false">
                                        <el-select style="width: 400px;" filterable remote  :filter-method="handleFilter"
                                            v-model="add_data.returnOrder.userId" placeholder="请选择客户">
                                            <el-option v-for="(item, index) in cusOptions" :key="index" :label="item.cusCompanyName"
                                                :value="item.id">
                                                <span style="float: left">{{ item.cusCompanyName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.cusRealName + '（' + item.cusPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="负责人" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getAllDutyOfCustom_handleFilter"
                                            v-model="add_data.returnOrder.useCarDutyUserId" placeholder="请选择负责人">
                                            <el-option v-for="(item, index) in getAllDutyOfCustom_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                    <el-form-item label="业务员" :required="false">
                                        <el-select disabled style="width: 400px;" filterable remote :filter-method="getServiceMans_handleFilter"
                                            v-model="add_data.returnOrder.serviceMan" placeholder="请选择业务员">
                                            <el-option v-for="(item, index) in getServiceMans_list" :key="index" :label="item.realName"
                                                :value="item.ftUserId">
                                                <span style="float: left">{{ item.realName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ item.realName + '（' + item.loginPhone + '）' }}</span>
                                            </el-option>
                                        </el-select>
                                    </el-form-item> -->
                                    <div style="display:flex;">
                                        <!-- <el-button @click="land_se_btn(2)" style="margin-left:20px"
                                            type="primary">航班号自动查询</el-button> -->
                                        <el-form-item label="接大巴时间" :required="false">
                                            <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD HH:mm"
                                                format="YYYY-MM-DD HH:mm" v-model="add_data.returnOrder.landDate"
                                                type="datetime" placeholder="请选择接大巴时间" />
                                                <el-input
                                                v-model="time_number2"
                                                @change='time_number_change1(4)'
                                                style="width: 260px;margin-left:10px"
                                                placeholder="时间转换,格式:1201转换时间为12:01"
                                                clearable
                                              />
                                        </el-form-item>


                                    </div>
                                    <div style="display:flex;">
                                        <el-form-item label="接大巴地点" :required="false">
                                            <div @click="car_map_btn(2)">
                                                <el-input disabled style="width:220px"
                                                    v-model="add_data.returnOrder.fromLocation" placeholder="请选择接大巴地点" />
                                            </div>

                                            <el-radio-group v-if="chartered_bus_off2" v-model="aircraft_radio2"
                                                style="margin-left:20px;">
                                                <el-radio label="拼车" size="large">拼车</el-radio>
                                                <el-radio label="包车" size="large">包车</el-radio>
                                            </el-radio-group>
                                            <el-button @click="bus_map_off_btn(3)" style="margin-left:30px;"
                                                type="primary">地图选址</el-button>
                                            <el-button v-if="aircraft_radio2 == '包车'" style="margin-left:30px;margin-bottom:0px"
                                                @click="add_passing_points(2)" type="warning">添加途经点</el-button>
                                        </el-form-item>

                                    </div>
                                    <div v-if="aircraft_radio2 == '拼车'" style="color:red;margin-bottom:20px;">系统默认拼车时间30分钟：系统自动按照当前出发时间前后30分钟可拼订单自动拼单！
                                    </div>
                                    <template v-if="passing_points_list2.length > 0">
                                        <el-form-item v-for="(item, index) in passing_points_index2" :key="index"
                                            label="途经地点：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div
                                                    style="color:#108EE9;width:230px;overflow: hidden;white-space: nowrap;">
                                                    {{
                                                        passing_points_list2[index].area + '-' +
                                                        passing_points_list2[index].name
                                                    }}</div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="passing_points_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="删除途经">
                                                        删除途经
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                    <div style="display:flex;">

                                        <el-form-item label="目的地址" :required="false">
                                            <el-select :filter-method="stationNamehandleFilter" clearable filterable remote  style="width:220px" @change="select_Btn2"
                                                v-model="add_data.returnOrder.toLocation" class="m-2" placeholder="请选择目的地址"
                                                size="mini">
                                                <el-option v-for="item in getStationList_Data" :key="item.stationName"
                                                :label="item.stationName" :value="item.stationName" >
                                                <span style="float: left">{{ item.stationName }}</span>
                                                <span style="
                                                float: right;
                                                color: var(--el-text-color-secondary);
                                                font-size: 13px;
                                              ">{{ '（' + item.address + '）' }}</span>
                                            </el-option>
                                            </el-select>
                                        </el-form-item>
                                        <el-button @click="bus_map_off_btn(4)" style="margin-left:30px;"
                                            type="primary">地图选址</el-button>


                                    </div>


                                    <el-form-item type="number" label="预约人数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.personNum"
                                            placeholder="请输入预约人数">
                                            <template #append>人</template></el-input>
                                    </el-form-item>

                                    <el-row>
                                        <el-col :span="8">
                                            <el-form-item v-if="aircraft_radio != '拼车'" label="指定车型" :required="false">
                                       
                                                <el-select @change="needSeats_change" v-model="add_data.needSeats" :filterable="false"
                                                    placeholder="请选择指定车型" style="width: 160px;">
                                                    <el-option label="不限车型" value="0"></el-option>
                                                    <el-option label="5座" value="5"></el-option>
                                                    <el-option label="7座" value="7"></el-option>
                                                    <el-option label="9座" value="9"></el-option>
                                                    <el-option label="12座" value="12"></el-option>
                                                    <el-option label="14座" value="14"></el-option>
                                                    <el-option label="17座" value="17"></el-option>
                                                     <el-option label="23座" value="23"></el-option>
                                                    <el-option label="30座" value="30"></el-option>
                                                    <el-option label="39座" value="39"></el-option>
                                                    <el-option label="49座" value="49"></el-option>
                                                    <el-option label="55座" value="55"></el-option>
    
                                                </el-select></el-form-item>
                                        </el-col>
                                        <el-col :span="16">
                                            <el-form-item v-if="aircraft_radio != '拼车'&& add_data.needSeats>0" label="车辆配置" :required="false">
                                       
                                                <el-select  v-model="add_data.carConfig" :filterable="false"
                                                    placeholder="请选择车辆配置" style="width: 360px;">
                                                    <!-- <el-option label="不限车型" value=""></el-option> -->
                                                    <el-option v-for="item in getCarConfigurationType_list" :key="item.id"
                                                    :label="item.text+'('+ item.other+')'" :value="item.val" />
    
                                                </el-select>
                                            </el-form-item>
                                        </el-col>
                                      </el-row>
                                    <!-- <el-form-item v-if="aircraft_radio2 != '拼车'" label="包车天数" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.days"
                                            placeholder="请输入包车天数">
                                            <template #append>天</template></el-input>
                                    </el-form-item>
                                    <div style="display:flex;" v-if="aircraft_radio2 != '拼车'">
                                        <el-form-item label="包车价格" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.price"
                                                placeholder="请输入包车价格">
                                                <template #append>元</template></el-input>
                                        </el-form-item>

                                        <el-button icon="PieChart" @click="price_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="primary">自动计算价格</el-button>
                                    </div>

                                    <el-form-item v-if="aircraft_radio2 != '拼车'" label="是否走高速" :required="false">
                                        <el-select v-model="add_data.returnOrder.isHighSpeed" :filterable="false"
                                            placeholder="请选择是否走高速" style="width: 220px;">
                                            <el-option label="走高速" value="1"></el-option>
                                            <el-option label="不走高速" value="0"></el-option>

                                        </el-select>
                                    </el-form-item> -->

                                    <el-form-item label="联系人姓名" :required="false">
                                        <el-input style="width:220px" v-model="add_data.returnOrder.cusName"
                                            placeholder="请输入联系人姓名" />
                                    </el-form-item>
                                    <div style="display:flex">
                                        <el-form-item type="number" label="联系人电话" :required="false">
                                            <el-input style="width:220px" v-model="add_data.returnOrder.cusMobile"
                                                placeholder="请输入联系人电话" />
                                        </el-form-item>
                                        <el-button v-if="aircraft_radio2 != '拼车'" @click="add_cusName_btn(2)"
                                            style="margin-left:30px;margin-bottom:10px" type="warning">添加联系人</el-button>
                                    </div>
                                    <template v-if="add_cusName_list2.length > 0">
                                        <el-form-item v-for="(item, index) in add_cusName_index2" :key="index" label="联系人：">
                                            <!-- @click="choseMapPoint" -->
                                            <div style="display: flex;">
                                                <div style="display: flex;">
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].name"
                                                        placeholder="请输入联系人姓名" />
                                                    <el-input style="width:220px" v-model="add_cusName_list2[index].mobile"
                                                        placeholder="请输入联系人电话" />
                                                </div>

                                                <div style="margin-left: 40px;">
                                                    <el-button @click="add_cusName_index_delbtn2(index)" type="danger"
                                                        icon="Close" plain size="mini" title="联系人">
                                                        联系人
                                                    </el-button>
                                                </div>
                                            </div>
                                        </el-form-item>
                                    </template>
                                  
                                    <el-form-item label="驾驶员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入驾驶员备注" v-model="add_data.returnOrder.driverRemark" />
                                    </el-form-item>
                                    <el-form-item label="业务员备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="2" type="textarea"
                                            placeholder="请输入业务员备注" v-model="add_data.returnOrder.serviceManRemark" />
                                    </el-form-item>
                                    <el-form-item label="客户备注" :required="false">
                                        <el-input autosize show-word-limit maxlength="200" :rows="3" type="textarea"
                                            placeholder="请输入客户备注" v-model="add_data.returnOrder.remark" />
                                    </el-form-item>
                                </el-form>
                              
                                <!-- <el-collapse>
                                    <el-collapse-item title="显示更多选填信息" name="1">

                                      
                                    </el-collapse-item>

                                </el-collapse> -->
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </el-dialog>


        <!-- 地图弹窗 -->
        <el-dialog style="margin-top:10vh;height:80vh;overflow: hidden;" v-model="map_off" title="选择地址:" width="80%"
            :close-on-click-modal='false'>
            <div class="div_map">
                <div class="map_input">
                    <el-input @input="map_change" id='tipinput' style="width:40%" v-model="map_address" placeholder="请输入地址">
                        <template #prepend>选择地址:</template>
                    </el-input>
                    <el-button @click="map_ok_btn" type="primary">确认</el-button>
                </div>
                <div v-if="map_address_list.length > 0" class="map_input2">
                    <div style="width:40%;background:#fff;margin-left:20px;padding: 10px;font-weight: 700;">
                        <div @click="map_list_btn(item)" class="div_bg" v-for="(item, index) in map_address_list"
                            :key="index" style="margin-top: 10px;">
                            {{ item.area }}-{{ item.name }}-{{ item.address }}
                        </div>
                    </div>
                </div>
                <div id="myMap" style="height: 65vh; width: 100%">
                </div>
            </div>
        </el-dialog>

        <!-- 航班选择 -->
        <el-dialog style="margin-top:5vh" v-model="land_se_off" title="航班自动查询" width="40%" :close-on-click-modal='false'>
            <div>
                <div style="color:red">
                    航班自动查询：【接天府】航班降落时间系统会默认延后30分钟
                </div>
                <div style="color:red;margin-top:10px">
                    航班自动查询：【送天府】航班起飞时间系统会默认提前4小时
                </div>
                <div style="margin-top:20px">
                    <el-form :model="land_se" label-width="110px" label-suffix="：">

                        <el-form-item label="航班号" :required="false">
                            <el-input style=" width: 200px" v-model="land_se.num" placeholder="请输入航班号" />
                        </el-form-item>
                        <el-form-item label="航班日期" :required="false">
                            <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD" format="YYYY-MM-DD"
                                v-model="land_se.date" type="date" placeholder="请选择航班日期" />
                        </el-form-item>
                        <el-button @click="ok_land_se_btn" style="margin-left:30vw;margin-top:5px"
                            type="primary">确认查询</el-button>
                        <hr>
                        <div v-if="land_se_list.depPort" style="width: 80%;display:flex;;border-radius: 8px;background: antiquewhite;margin: auto;height: 80px;
                            justify-content: space-evenly; " @click="land_se_list_btn(1)">
                            <div style="display: flex;flex-direction: column;justify-content: space-evenly;">
                                <div style="font-weight:700">{{ land_se_list.depScheduled.split(' ')[1] }}</div>
                                <div>{{ land_se_list.depPort }}T{{ land_se_list.depTerminal }}</div>
                                <div style="color:#666;font-weight:700"> {{ land_se_list.flightNo }}</div>
                            </div>
                            <div style="display:flex;align-items: center;">
                                <el-icon :size="60">
                                    <DArrowRight />
                                </el-icon>
                            </div>
                            <div style="display: flex;flex-direction: column;justify-content: space-evenly;">
                                <div style="font-weight:700"> {{ land_se_list.arrScheduled.split(' ')[1] }}</div>
                                <div> {{ land_se_list.arrPort }}T{{ land_se_list.arrTerminal }}</div>
                                <div style="color:#666;font-weight:700"> {{ land_se_list.depScheduled.split(' ')[0] }}</div>
                            </div>
                        </div>
                    </el-form>
                </div>
            </div>


        </el-dialog>

        <!-- 列车选择 -->
        <el-dialog style="margin-top:5vh" v-model="train_se_off" title="列车号自动查询" width="40%" :close-on-click-modal='false'>
            <div>
                <div style="color:red">
                    列车号自动查询：到站时间系统会默认延后30分钟
                </div>
                <div style="color:red;margin-top:10px">
                    列车号自动查询：出发时间系统会默认提前4小时
                </div>
                <div style="margin-top:20px">
                    <el-form :model="train_se" label-width="110px" label-suffix="：">

                        <el-form-item label="列车号" :required="false">
                            <el-input style=" width: 200px" v-model="train_se.num" placeholder="请输入列车号" />
                        </el-form-item>
                        <el-form-item label="列车日期" :required="false">
                            <el-date-picker style=" width: 200px" value-format="YYYY-MM-DD" format="YYYY-MM-DD"
                                v-model="train_se.date" type="date" placeholder="请选择列车日期" />
                        </el-form-item>
                        <el-button @click="ok_train_se_btn" style="margin-left:30vw;margin-top:5px"
                            type="primary">确认查询</el-button>
                        <hr>
                        <div v-if="train_se_list.list" style="width: 80%;border-radius: 8px;background: antiquewhite;margin: auto;height: 500px;
                         ">
                            <div style="width:80%;height:100px;margin:0px auto;margin-top:10px;font-size:20px">
                                <div style="display: flex;justify-content: space-between;">
                                    <div style="display: flex;">
                                        <div style="font-weight:700">{{ train_se_list.trainno }}</div>
                                        <div style="font-weight:700;margin-left:10px">{{ train_se_list.typename }}</div>
                                    </div>
                                    <div style="color:#666;font-weight:700">耗时&nbsp;&nbsp;{{ train_se_list.costtimetxt }}
                                    </div>
                                </div>

                                <div style="display:flex;justify-content: center;align-items: center;">
                                    <div style="font-weight:700;margin-right:20px">{{ train_se_list.startstation }}</div>
                                    <el-icon :size="60">
                                        <DArrowRight />
                                    </el-icon>
                                    <div style="font-weight:700;margin-left:20px">{{ train_se_list.endstation }}</div>
                                </div>

                            </div>
                            <div style="height:2px;width:100%;background:#fff;"></div>
                            <div style="height:400px;width:100%;overflow: auto;">
                                <div v-for="(item,index) in queryNow_list" :key="index">
                                    <div v-if="index == 0">
                                        <div style="display: flex;justify-content: space-between;height: 30px;align-items: center; ">
                                            <div>{{queryNow_list[0].station}} <text style="color: sandybrown;">(始发)</text></div>
                                            <div @click="fa_btn(queryNow_list[0])"
                                                style="width: 100px;background-color:#3C9CFF;text-align: center;border-radius: 6px;color: #fff;padding: 5px 6px;">
                                                {{queryNow_list[0].departuretime}}&nbsp;发车
                                            </div>
                
                                        </div>
                                        <div style="width: 100%;height: 1px;background-color: #F3F3F3;"></div>
                                    </div>
                                    <div v-if="index != 0 && index != (queryNow_list.length -1)">
                                        <div style="display: flex;justify-content: space-between;height: 30px;align-items: center; ">
                                            <div>{{queryNow_list[index].station}}</div>
                                            <div @click="jin_btn(queryNow_list[index])"
                                                style="padding: 5px 6px; background-color:#5AC725;text-align: center;border-radius: 6px;color: #fff;">
                                                {{queryNow_list[index].station.includes('成都')?'接 - ':""}}{{queryNow_list[index].arrivaltime}}&nbsp;进站
                                            </div>
                
                                        </div>
                                        <div style="display: flex;justify-content: space-between;height: 30px;align-items: center; ">
                                            <div>停{{time_fun(queryNow_list[index]) }}分钟 </div>
                
                                            <div @click="fa_btn(queryNow_list[index])"
                                                style="padding: 5px 6px;background-color:#3C9CFF;text-align: center;border-radius: 6px;color: #fff;">
                                                {{queryNow_list[index].station.includes('成都')?'送 - ':""}}{{queryNow_list[index].departuretime}}&nbsp;发车
                                            </div>
                                        </div>
                                        <div style="width: 100%;height: 2px;background-color: #F3F3F3;"></div>
                                    </div>
                                    <div v-if="index == (queryNow_list.length -1)">
                                        <div style="display: flex;justify-content: space-between;height: 30px;align-items: center; ">
                                            <div>{{queryNow_list[queryNow_list.length -1].station}} <text
                                                    style="color: sandybrown;">(终点)</text></div>
                                            <div @click="jin_btn(queryNow_list[queryNow_list.length -1])"
                                                style="width: 100px;background-color:#5AC725;text-align: center;border-radius: 6px;color: #fff;padding: 5px 6px;">
                                                {{queryNow_list[queryNow_list.length -1].arrivaltime}}&nbsp;进站
                                            </div>
                
                                        </div>
                
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-form>
                </div>
            </div>


        </el-dialog>
    </div>
</template>

<script setup>
import { GET_TOKEN } from '@/utils/token.js'
import { ref, reactive, onMounted, computed, watch } from 'vue'
import {
    getOrderList, findTravelWayInfo, getStationListPages, add, findStationCombo, getStationType, findAddressByLocation, findMapPointList,
    edit, omsorderdelete, getOrderInfo, mergeQuery, merge, omsorderexport, cancelMerge, adupPrivateSet, getPrivateSetList, getPrice,
    findComboCusList,getAllDutyOfCustom,getServiceMans,getCarConfigurationType
} from '@/api/original_order_list.js'
import { ElMessage, ElLoading, ElMessageBox } from 'element-plus'
import AMapLoader from "@amap/amap-jsapi-loader"
import { securityJsCode, key, importCusCheckInData } from '@/utils/common.js'

onMounted(() => {
    list_data()
    getOrderInfo({ id: props.id }).then(res => {
        getOrderInfo_data.value = res.data
        // if(){

        // }
        let cusInfo = getOrderInfo_data.value.cusInfo.split(',')
        let cusInfo_index = cusInfo.shift()
      
         add_data.cusName =cusInfo_index.split('-')[0]
         add_data.cusMobile = cusInfo_index.split('-')[1]
         let arr_persons = []
         for(let i =0 ;i<cusInfo.length;i++){
				let cusInfo_data = {
					name:'',
					mobile:'',
				}
				cusInfo_data.name = cusInfo[i].split('-')[0]
				cusInfo_data.mobile = cusInfo[i].split('-')[1]
				arr_persons.push(cusInfo_data)
				
			}

        getOrderInfo_data.value.persons = arr_persons
        up_getOrderInfo()
        queryCusPageList()
        // getAllDutyOfCustom_api()
    getServiceMans_api()
     })

    })


//行程简称、
const routeSimpleName_list = ref([ {
        value: '接天府',
        label: '接天府'
      }, 
      {
        value: '送天府',
        label: '送天府'
      },
    {
        value: '拼车接天府',
        label: '拼车接天府'
      }, 
      {
        value: '拼车送天府',
        label: '拼车送天府'
      }, {
        value: '接双流',
        label: '接双流'
      }, 
      {
        value: '送双流',
        label: '送双流'
      }, {
        value: '接东站',
        label: '接东站'
      }, 
      {
        value: '送东站',
        label: '送东站'
      }, {
        value: '接西站',
        label: '接西站'
      },{
        value: '送西站',
        label: '送西站'
      },
      {
        value: '接南站',
        label: '接南站'
      }, {
        value: '送南站',
        label: '送南站'
      },   {
        value: '接北站',
        label: '接北站'
      }, {
        value: '送北站',
        label: '送北站'
      }, {
        value: '接集合点大巴',
        label: '接集合点大巴'
      },  {
        value: '送集合点大巴',
        label: '送集合点大巴'
      },])
const routeSimpleName_change = () => {
    add_data.landDate = ''
     add_data.flightDate = ''

    add_data.toLocation =  ''
    add_data.toLocationId =  ''
    add_data.toLocationData.address =  ''
    add_data.toLocationData.area =  ''
    add_data.toLocationData.id =  ''
    add_data.toLocationData.isSta =  ''
    add_data.toLocationData.lnglat = ''
    add_data.toLocationData.name =  ''
    add_data.toLocationData.tel = ''
    add_data.toLocationData.type =  ''

    add_data.fromLocation = ''
    add_data.fromLocationId = ''
    add_data.fromLocationData.address = ''
    add_data.fromLocationData.area = ''
    add_data.fromLocationData.id =''
    add_data.fromLocationData.isSta = ''
    add_data.fromLocationData.lnglat = ''
    add_data.fromLocationData.name =''
    add_data.fromLocationData.tel = ''
    add_data.fromLocationData.type = ''
}
// 时间修改
const time_number1 = ref('')
const time_number2 = ref('')
const time_number_change1 = (e) =>{
    if(e == 1){
        // add_data.landDate转换
        if(!add_data.landDate){
            time_number1.value = ''
            return ElMessage({
                        message: '请先选择日期',
                        type: 'warning',
                    })
        }else if(time_number1.value.length !=4){
            time_number1.value = ''
            return ElMessage({
                message: '时间格式不对，列12:01请输入1201',
                type: 'warning',
            })
        }else if(time_number1.value[0] >2){
            time_number1.value = ''
            return ElMessage({
                message: '时间格式不对，首数字不能大于2',
                type: 'warning',
            })
        }else if(time_number1.value[0] == 2){
            if(time_number1.value[1] > 4){
                time_number1.value = ''
                return ElMessage({
                message: '时间格式不对，列12:01请输入1201',
                type: 'warning',
            })
            }
         
        }
        // console.log(add_data.landDate,'add_data.landDate')
        let datetime1 = add_data.landDate.split(' ')[0]
        let datetime2 = time_number1.value[0]+time_number1.value[1]+':'+time_number1.value[2]+time_number1.value[3]
        add_data.landDate = datetime1 +' '+datetime2
        // console.log(datetime1,'datetime1')
        // console.log(datetime2,'datetime2')
        // console.log(add_data.landDate,'add_data.landDate')
        time_number1.value = ''
    }else if(e == 2){
        // add_data.flightDate
        if(!add_data.flightDate){
            time_number1.value = ''
            return ElMessage({
                        message: '请先选择日期',
                        type: 'warning',
                    })
        }else if(time_number1.value.length !=4){
            time_number1.value = ''
            return ElMessage({
                message: '时间格式不对，列12:01请输入1201',
                type: 'warning',
            })
        }else if(time_number1.value[0] >2){
            time_number1.value = ''
            return ElMessage({
                message: '时间格式不对，首数字不能大于2',
                type: 'warning',
            })
        }else if(time_number1.value[0] == 2){
         
            if(time_number1.value[1] > 4){
                time_number1.value = ''
                return ElMessage({
                message: '时间格式不对，列12:01请输入1201',
                type: 'warning',
            })
            }
         
        }
       
        let datetime1 = add_data.flightDate.split(' ')[0]
        let datetime2 = String(time_number1.value[0]+time_number1.value[1]+':'+time_number1.value[2]+time_number1.value[3])
        add_data.flightDate = datetime1 +' '+datetime2 
       
        time_number1.value = ''
    }else if(e == 3){
        // add_data.returnOrder.flightDate
        if(!add_data.returnOrder.flightDate){
            time_number2.value = ''
            return ElMessage({
                        message: '请先选择日期',
                        type: 'warning',
                    })
        }else if(time_number2.value.length !=4){
            time_number2.value = ''
            return ElMessage({
                message: '时间格式不对，列12:01请输入1201',
                type: 'warning',
            })
        }else if(time_number2.value[0] >2){
            time_number2.value = ''
            return ElMessage({
                message: '时间格式不对，首数字不能大于2',
                type: 'warning',
            })
        }else if(time_number2.value[0] == 2){
            if(time_number2.value[1] > 2){
                time_number2.value = ''
                return ElMessage({
                message: '时间格式不对，列12:01请输入1201',
                type: 'warning',
            })
            }
         
        }
        let datetime1 = add_data.returnOrder.flightDate.split(' ')[0]
        let datetime2 = time_number2.value[0]+time_number2.value[1]+':'+time_number2.value[2]+time_number2.value[3]
        add_data.returnOrder.flightDate = datetime1 +' '+datetime2 
        time_number2.value = ''
    }else if(e == 4){
        // add_data.returnOrder.landDate
        if(!add_data.returnOrder.landDate){
            time_number2.value = ''
            return ElMessage({
                        message: '请先选择日期',
                        type: 'warning',
                    })
        }else if(time_number2.value.length !=4){
            time_number2.value = ''
            return ElMessage({
                message: '时间格式不对，列12:01请输入1201',
                type: 'warning',
            })
        }else if(time_number2.value[0] >2){
            time_number2.value = ''
            return ElMessage({
                message: '时间格式不对，首数字不能大于2',
                type: 'warning',
            })
        }else if(time_number2.value[0] == 2){
            if(time_number2.value[1] > 2){
                time_number2.value = ''
                return ElMessage({
                message: '时间格式不对，列12:01请输入1201',
                type: 'warning',
            })
            }
         
        }
        let datetime1 = add_data.returnOrder.landDate.split(' ')[0]
        let datetime2 = time_number2.value[0]+time_number2.value[1]+':'+time_number2.value[2]+time_number2.value[3]
        add_data.returnOrder.landDate = datetime1 +' '+datetime2 
        time_number2.value = ''
    }
}

//#region 判断人数
const stationList = ref([])
const getCarConfigurationType_list = ref([])
const getCarConfigurationType_list2 = ref([])
const needSeats_change = () => {
    add_data.carConfig =''
     add_data.price =''
 add_data.ensureMoney =''
 add_data.regularCarMoney =''
    let stationListId = bus_list.value[0].id
    if ( add_data.routeSimpleName.includes('接')) {
        for(let i =0;i<stationList.value.length;i++){
            if (add_data.fromLocation ==stationList.value[i].station_name ) {
                stationListId = stationList.value[i].id
                
            }
            
        }

   
   } else if (add_data.routeSimpleName.includes('送')) {


    for(let i =0;i<stationList.value.length;i++){
            if (add_data.toLocation ==stationList.value[i].station_name ) {
                stationListId = stationList.value[i].id
            }
            
        }

     
    }
   
   


    if (add_data.needSeats>0) {
        if (add_data.needSeats < Number(add_data.personNum) + 1) {
            add_data.needSeats = '0'
            add_data.priceNeedSeats = ''
            return ElMessage({
                message: '指定车型少于乘车人＋驾驶员，请重新选择',
                type: 'warning',
            })
        } else {
             let luser = JSON.parse(localStorage.getItem("luser"))
    let luser_companyNum = luser.companyNum

            getCarConfigurationType({
                stationListId: stationListId,
                addWay: '1',
                seats: add_data.needSeats,
                companyNum: luser_companyNum,
                orderType:'0',
            }).then(res => {

                if (res.code == 1) {
                    getCarConfigurationType_list.value = res.data
                } else {
                    add_data.needSeats = '0'
                    add_data.priceNeedSeats = ''
                    return ElMessage({
                        message: res.msg,
                        type: 'warning',
                    })
                }
            })
        }
    }
}
const needSeats_change2 = () => {
    add_data.returnOrder.carConfig =''
    let stationListId = bus_list.value[0].id

    if (add_data.isReturnAdd == 'true' || add_data.isReturnAdd == '是') {
       if (add_data.routeSimpleName.includes('接')) {

        for(let i =0;i<stationList.value.length;i++){
            if (add_data.returnOrder.toLocation ==stationList.value[i].station_name ) {
                stationListId = stationList.value[i].id
                
            }
            
        }

          
       } else if (add_data.routeSimpleName.includes('送')) {

        for(let i =0;i<stationList.value.length;i++){
            if (add_data.returnOrder.fromLocation ==stationList.value[i].station_name ) {
                stationListId = stationList.value[i].id
            }
            
        }

     
    }
           
       
   }
    if (add_data.returnOrder.needSeats>0) {
        if ( add_data.returnOrder.needSeats < Number(add_data.returnOrder.personNum) + 1) {
            add_data.returnOrder.needSeats ='0'
            return ElMessage({
                message: '返程中指定车型少于乘车人＋驾驶员，请重新选择',
                type: 'warning',
            })
        } else {
            let luser = JSON.parse(localStorage.getItem("luser"))
    let luser_companyNum = luser.companyNum
 
            getCarConfigurationType({
                stationListId: stationListId,
                addWay: '1',
                seats: add_data.returnOrder.needSeats,
                companyNum: luser_companyNum,
                orderType:'0',
            }).then(res => {

                if (res.code == 1) {
                    getCarConfigurationType_list2.value = res.data
                } else {
                    add_data.returnOrder.needSeats ='0'
                    return ElMessage({
                        message: res.msg,
                        type: 'warning',
                    })
                }
            })
        }
    }

}



//#endregion
const price_handleInput = (value) =>{
    add_data.price = value.replace(/\./g, '');
    if(value <= 0){
        serviceManRemark_off.value = true
    }
}
const price_btn = (e) =>{
    let timeDate = new Date().getTime()
   if (add_data.flightDate) {
       let flightDate1 = new Date(add_data.flightDate).getTime()
    //    if (flightDate1 < timeDate) {
    //        return ElMessage({
    //            message: '时间不能小于当前时间',
    //            type: 'warning',
    //        })
    //    }
   }
   if (add_data.returnOrder.flightDate) {
       let flightDate2 = new Date(add_data.returnOrder.flightDate).getTime()
    //    if (flightDate2 < timeDate) {
    //        return ElMessage({
    //            message: '时间不能小于当前时间',
    //            type: 'warning',
    //        })
    //    }
   }
   if (add_data.landDate) {
       let landDate1 = new Date(add_data.landDate).getTime()
    //    if (landDate1 < timeDate) {
    //        return ElMessage({
    //            message: '时间不能小于当前时间',
    //            type: 'warning',
    //        })
    //    }
   }
   if (add_data.returnOrder.landDate) {
       let landDate2 = new Date(add_data.returnOrder.landDate).getTime()
    //    if (landDate2 < timeDate) {
    //        return ElMessage({
    //            message: '时间不能小于当前时间',
    //            type: 'warning',
    //        })
    //    }
   } 






   if (add_data.landDate == '' && add_data.flightDate == '' ) {
       return ElMessage({
           message: '请选择时间',
           type: 'warning',
       })
   } else if (!add_data.fromLocation) {
       return ElMessage({
           message: '请选择开始地址',
           type: 'warning',
       })
   }
   else if (!add_data.toLocation) {
       return ElMessage({
           message: '请选择目的地址',
           type: 'warning',
       })
   }

   if (!add_data.personNum) {
       return ElMessage({
           message: '请输入预约人数',
           type: 'warning',
       })
   } else if (!add_data.isReturnAdd) {
       return ElMessage({
           message: '请输入是否返程',
           type: 'warning',
       })
   }
   console.log(add_data.isReturnAdd == 'true',add_data.isReturnAdd)
   
   if (add_data.isReturnAdd == 'true') {
       let time1 = add_data.landDate? add_data.landDate :add_data.flightDate
       let time2 = add_data.returnOrder.landDate? add_data.returnOrder.landDate :add_data.returnOrder.flightDate
       time1 = time1.split(' ')[0]
       time2 = time2.split(' ')[0]
       time1 =new Date(time1).getTime()
       time2 =new Date(time2).getTime()
       if (time2 < time1 ) {
           return ElMessage({
           message: '返程订单时间不能小于正常订单时间',
           type: 'warning',
       })
       }
   }
 
   if (add_data.needSeats>0) {
       if ( add_data.needSeats < Number(add_data.personNum) + 1) {

           return ElMessage({
               message: '指定车型少于乘车人＋驾驶员，请重新选择',
               type: 'warning',
           })
       }
   }
   if (add_data.returnOrder.needSeats>0) {
       if ( add_data.returnOrder.needSeats < Number(add_data.returnOrder.personNum) + 1) {

           return ElMessage({
               message: '返程中指定车型少于乘车人＋驾驶员，请重新选择',
               type: 'warning',
           })
       }
   }
   





   if (!add_data.routeSimpleName.includes('集合点大巴')) {
       if (add_data.routeSimpleName.includes('接')) {
           for (let i = 0; i < aircraft_list.value.length; i++) {
               if (add_data.fromLocation == aircraft_list.value[i].station_name) {
                   add_data.fromLocationId = aircraft_list.value[i].id
                   add_data.fromLocationData.address = aircraft_list.value[i].station_name
                   add_data.fromLocationData.area = aircraft_list.value[i].station_name
                   add_data.fromLocationData.lnglat = aircraft_list.value[i].lng_lat
               }
               if (add_data.isReturnAdd == 'true' || add_data.isReturnAdd == '是') {
                   if (add_data.returnOrder.toLocation == aircraft_list.value[i].station_name) {
                       add_data.returnOrder.toLocationId = aircraft_list.value[i].id
                       add_data.returnOrder.toLocationData.address = aircraft_list.value[i].station_name
                       add_data.returnOrder.toLocationData.area = aircraft_list.value[i].station_name
                       add_data.returnOrder.toLocationData.lnglat = aircraft_list.value[i].lng_lat
                   }

               }
           }
           for (let i = 0; i < train_list.value.length; i++) {
               if (add_data.fromLocation == train_list.value[i].station_name) {
                   add_data.fromLocationId = train_list.value[i].id
                   add_data.fromLocationData.address = train_list.value[i].station_name
                   add_data.fromLocationData.area = train_list.value[i].station_name
                   add_data.fromLocationData.lnglat = train_list.value[i].lng_lat
               }
               if (add_data.isReturnAdd == 'true' || add_data.isReturnAdd == '是') {
                   if (add_data.returnOrder.toLocation == train_list.value[i].station_name) {
                       add_data.returnOrder.toLocationId = train_list.value[i].id
                       add_data.returnOrder.toLocationData.address = train_list.value[i].station_name
                       add_data.returnOrder.toLocationData.area = train_list.value[i].station_name
                       add_data.returnOrder.toLocationData.lnglat = train_list.value[i].lng_lat
                   }

               }
           }
       } else {
           for (let i = 0; i < aircraft_list.value.length; i++) {
               if (add_data.toLocation == aircraft_list.value[i].station_name) {
                   add_data.toLocationId = aircraft_list.value[i].id
                   add_data.toLocationData.address = aircraft_list.value[i].station_name
                   add_data.toLocationData.area = aircraft_list.value[i].station_name
                   add_data.toLocationData.lnglat = aircraft_list.value[i].lng_lat
               }
               if (add_data.isReturnAdd == 'true' || add_data.isReturnAdd == '是') {
                   if (add_data.returnOrder.fromLocation == aircraft_list.value[i].station_name) {
                       add_data.returnOrder.fromLocationId = aircraft_list.value[i].id
                       add_data.returnOrder.fromLocationData.address = aircraft_list.value[i].station_name
                       add_data.returnOrder.fromLocationData.area = aircraft_list.value[i].station_name
                       add_data.returnOrder.fromLocationData.lnglat = aircraft_list.value[i].lng_lat
                   }

               }
           }
           for (let i = 0; i < train_list.value.length; i++) {
               if (add_data.toLocation == train_list.value[i].station_name) {
                   add_data.toLocationId = train_list.value[i].id
                   add_data.toLocationData.address = train_list.value[i].station_name
                   add_data.toLocationData.area = train_list.value[i].station_name
                   add_data.toLocationData.lnglat = train_list.value[i].lng_lat
               }
               if (add_data.isReturnAdd == 'true' || add_data.isReturnAdd == '是') {
                   if (add_data.returnOrder.fromLocation == train_list.value[i].station_name) {
                       add_data.returnOrder.fromLocationId = train_list.value[i].id
                       add_data.returnOrder.fromLocationData.address = train_list.value[i].station_name
                       add_data.returnOrder.fromLocationData.area = train_list.value[i].station_name
                       add_data.returnOrder.fromLocationData.lnglat = train_list.value[i].lng_lat
                   }

               }
           }
       }
   } else {
    
   add_data.meetStationId = bus_list.value[0].id
    
   }
   if (aircraft_radio.value == '包车') {
       add_data.type = '1'
   } else {
       add_data.type = '0'
   }
   if (aircraft_radio2.value == '包车') {
       add_data.returnOrder.type = '1'
   } else {
       add_data.returnOrder.type = '0'
   }
   if (add_data.isReturnAdd == 'true' || add_data.isReturnAdd == '是') {
       add_data.returnOrder.points = passing_points_list2.value
       add_data.returnOrder.persons = add_cusName_list2.value
       add_data.points = passing_points_list.value
       add_data.persons = add_cusName_list.value
       add_data.returnTime = add_data.returnOrder.flightDate?add_data.returnOrder.flightDate:add_data.returnOrder.landDate
   } else {
       add_data.points = passing_points_list.value
       add_data.persons = add_cusName_list.value
   }
   let useCarCompanyName1 = ''
   for(let i = 0; i<cusOptions2.value.length;i++){
       if(add_data.userId ==cusOptions2.value[i].userId ){
        useCarCompanyName1 = cusOptions2.value[i].cusCompanyName
       }
   }
   add_data.useCarCompanyName = useCarCompanyName1
   add_data.returnOrder.useCarCompanyName = useCarCompanyName1

   let useCarDutyInfo1 = ''
   for(let i = 0; i<getAllDutyOfCustom_list2.value.length;i++){
       if(add_data.useCarDutyUserId ==getAllDutyOfCustom_list2.value[i].ftUserId ){
        useCarDutyInfo1 = getAllDutyOfCustom_list2.value[i].ftUserId+'-'+getAllDutyOfCustom_list2.value[i].realName+'-'+getAllDutyOfCustom_list2.value[i].loginPhone
       }
   }
   add_data.useCarDutyInfo = useCarDutyInfo1
   add_data.returnOrder.useCarDutyInfo = useCarDutyInfo1

   let serviceMan1 = ''
   for(let i = 0; i<getServiceMans_list2.value.length;i++){
       if(add_data.serviceMan ==getServiceMans_list2.value[i].ftUserId ){
           serviceMan1 = getServiceMans_list2.value[i].ftUserId+'-'+getServiceMans_list2.value[i].realName+'-'+getServiceMans_list2.value[i].loginPhone
       }
   }
   add_data.serviceMan = serviceMan1
   add_data.returnOrder.serviceMan = serviceMan1

//    let luser = JSON.parse(localStorage.getItem("luser"))
//    add_data.userId = luser.uname
   console.log(add_data)
    if(e ==1){
       
        let startTime = ''
        if (add_data.flightNum) {
            if(add_data.routeSimpleName.includes('接')){
            startTime =add_data.landDate+':00'
          }else{
            startTime = add_data.flightDate+':00'
          } 
            
        } else {
            if(add_data.routeSimpleName.includes('接')){
            startTime =add_data.landDate+':00'
          }else{
            startTime = add_data.flightDate+':00'
          } 
        }
   let ps = {
    cusMobile: add_data.cusMobile,
    cusName: add_data.cusName,
    days: add_data.days,
    endTime: add_data.endTime,
    flightDate: add_data.flightDate,
    flightNum: add_data.flightNum,
    flightTime: add_data.flightTime,
    fromLocation: add_data.fromLocation,
    fromLocationData: add_data.fromLocationData,
    fromLocationId: add_data.fromLocationId,
    isHighSpeed: add_data.isHighSpeed,
    landDate: add_data.landDate,
    needSeats: add_data.needSeats,
    priceNeedSeats: add_data.priceNeedSeats,
     carConfig: add_data.carConfig,
    personNum: add_data.personNum,
    receiveMsg: add_data.receiveMsg,
    remark: add_data.remark,
    serviceManRemark: add_data.serviceManRemark,
    driverRemark: add_data.driverRemark,
    routeSimpleName: add_data.routeSimpleName,
    returnTime: add_data.returnTime,
    startTime: startTime,
    toLocation: add_data.toLocation,
    toLocationData: add_data.toLocationData,
    toLocationId: add_data.toLocationId,
    userId: add_data.userId,
    userId: add_data.userId,
    useCarDutyUserId: add_data.useCarDutyUserId,
    useCarCompanyName: add_data.useCarCompanyName,
    useCarDutyInfo: add_data.useCarDutyInfo,
    serviceMan: add_data.serviceMan,
    type: add_data.type,
    price: add_data.price,
    ensureMoney : add_data.ensureMoney ,
    regularCarMoney : add_data.regularCarMoney ,
    points: add_data.points,
    persons: add_data.persons,
    id: add_data.id,
    meetStationId:add_data.meetStationId?bus_list.value[0].id:'',
   }
   if(ps.needSeats == '0' || ps.needSeats == ''){
    ps.needSeats = null
    }
    if(ps.priceNeedSeats == '0' || ps.priceNeedSeats == ''){
        ps.priceNeedSeats = null
    }
   getPrice(ps).then(res => {

       if (res.code == 1) {
          
        add_data.serviceMan =  add_data.serviceMan.split('-')[0]
 add_data.returnOrder.serviceMan =  add_data.returnOrder.serviceMan.split('-')[0]
        add_data.price = res.data.price
        add_data.ensureMoney  = res.data.ensureMoney 
        add_data.regularCarMoney  = res.data.regularCarMoney 
        add_data.priceNeedSeats  = res.data.priceNeedSeats 
          
          
       } else {
        add_data.serviceMan =  add_data.serviceMan.split('-')[0]
 add_data.returnOrder.serviceMan =  add_data.returnOrder.serviceMan.split('-')[0]
        add_data.price = ''
        add_data.ensureMoney  = ''
        add_data.regularCarMoney  = ''
           return ElMessage({
               message: res.msg,
               type: 'warning',
           })
       }
   })
       
    }else{
        let startTime = ''
        if (add_data.returnOrder.flightNum) {
          if(add_data.returnOrder.routeSimpleName.includes('接')){
            startTime =add_data.returnOrder.landDate+':00'
          }else{
            startTime = add_data.returnOrder.flightDate+':00'
          } 
            
        } else {
            if(add_data.returnOrder.routeSimpleName.includes('接')){
            startTime =add_data.returnOrder.landDate+':00'
          }else{
            startTime = add_data.returnOrder.flightDate+':00'
          } 
        }
       
        let ps = {
    cusMobile: add_data.returnOrder.cusMobile,
    cusName: add_data.returnOrder.cusName,
    days: add_data.returnOrder.days,
    endTime: add_data.returnOrder.endTime,
    flightDate: add_data.returnOrder.flightDate,
    flightNum: add_data.returnOrder.flightNum,
    flightTime: add_data.returnOrder.flightTime,
    fromLocation: add_data.returnOrder.fromLocation,
    fromLocationData: add_data.returnOrder.fromLocationData,
    fromLocationId: add_data.returnOrder.fromLocationId,
    // isHighSpeed: add_data.returnOrder.isHighSpeed,
    landDate: add_data.returnOrder.landDate,
    needSeats: add_data.returnOrder.needSeats,
    priceNeedSeats: add_data.returnOrder.priceNeedSeats,
    carConfig: add_data.returnOrder.carConfig,
    personNum: add_data.returnOrder.personNum,
    receiveMsg: add_data.returnOrder.receiveMsg,
    remark: add_data.returnOrder.remark,
    serviceManRemark: add_data.returnOrder.serviceManRemark,
    driverRemark: add_data.returnOrder.driverRemark,
    routeSimpleName: add_data.returnOrder.routeSimpleName,
    // returnTime: add_data.returnOrder.returnTime,
    
    startTime:startTime,
    toLocation: add_data.returnOrder.toLocation,
    toLocationData: add_data.returnOrder.toLocationData,
    toLocationId: add_data.returnOrder.toLocationId,
    userId: add_data.userId,
    userId: add_data.returnOrder.userId,
    useCarDutyUserId: add_data.returnOrder.useCarDutyUserId,
    useCarCompanyName: add_data.returnOrder.useCarCompanyName,
    useCarDutyInfo: add_data.returnOrder.useCarDutyInfo,
    serviceMan: add_data.returnOrder.serviceMan,
    type: add_data.returnOrder.type,
    price: add_data.returnOrder.price,
    ensureMoney : add_data.returnOrder.ensureMoney ,
    regularCarMoney : add_data.returnOrder.regularCarMoney ,
    points: add_data.returnOrder.points,
    persons: add_data.returnOrder.persons,
    meetStationId:add_data.returnOrder.meetStationId?bus_list.value[0].id:''
    // id: add_data.returnOrder.id,
}
if(ps.needSeats == '0' || ps.needSeats == ''){
    ps.needSeats = null
    }
    if(ps.priceNeedSeats == '0' || ps.priceNeedSeats == ''){
        ps.priceNeedSeats = null
    }

        getPrice(ps).then(res => {

if (res.code == 1) {
   
    add_data.serviceMan =  add_data.serviceMan.split('-')[0]
 add_data.returnOrder.serviceMan =  add_data.returnOrder.serviceMan.split('-')[0]

 add_data.returnOrder.price =res.data.price 
 add_data.returnOrder.ensureMoney  =res.data.ensureMoney  
 add_data.returnOrder.regularCarMoney  =res.data.regularCarMoney  
 add_data.returnOrder.priceNeedSeats  =res.data.priceNeedSeats  
   
} else {
    add_data.serviceMan =  add_data.serviceMan.split('-')[0]
 add_data.returnOrder.serviceMan =  add_data.returnOrder.serviceMan.split('-')[0]
 add_data.returnOrder.price =''
 add_data.returnOrder.ensureMoney =''
 add_data.returnOrder.regularCarMoney =''
    return ElMessage({
        message: res.msg,
        type: 'warning',
    })
}
})
       
    }
}
//#region 客户
const cusOptions = ref([])
const cusOptions2 = ref([])
const queryCusPageList = () => {
  
    findComboCusList({
        find: '',
        page: {
            pageNum: 1,
            pageSize: 999,
        },
    }).then(res => {
        if (res.code == 1) {
            cusOptions.value = res.data;
            cusOptions2.value = res.data;
            // 追加已选中的数据
            // if (cusObjArr.value.length > 0) cusOptions.value = cusObjArr.value.concat(cusOptions.value);
        }
    })
}
const handleFilter = (value) => {
    // 自定义筛选逻辑
    if (value) {
        let results = cusOptions2.value.filter(item => {
            for (let key in item) {
                if (typeof item[key] === 'string' && item[key].includes(value)) {
                    return true;
                }
            }
            return false;
        })
        if (results.length > 0) {
            cusOptions.value =results
        } else {
            cusOptions.value =[]
        }
    } else {
        cusOptions.value = cusOptions2.value
    }
}
const stationNamehandleFilter = (value) => {
    // 自定义筛选逻辑
    if (value) {
        let results = getStationList_Data2.value.filter(item => {
            for (let key in item) {
                if (typeof item[key] === 'string' && item[key].includes(value)) {
                    return true;
                }
            }
            return false;
        })
        if (results.length > 0) {
            getStationList_Data.value =results
        } else {
            getStationList_Data.value =[]
        }
    } else {
        getStationList_Data.value = getStationList_Data2.value
    }
}
const cusCompany_change = (e) =>{
    console.log(e)
    let data = {}
    for (let i = 0; i < cusOptions2.value.length; i++) {
        if (e == cusOptions2.value[i].userId) {
            data = cusOptions2.value[i]



            getAllDutyOfCustom_list.value = []
            getAllDutyOfCustom_list2.value = []
            if (data.dutyService) {
                let dutyService = data.dutyService.split(',')
                if (dutyService) {
                    add_data.useCarDutyUserId = dutyService[0].split('-')[0]
                    for (let i = 0; i < dutyService.length; i++) {
                        let dutyService_data = {
                            ftUserId: '',
                            loginPhone: '',
                            realName: '',
                        }



                        dutyService_data.ftUserId = dutyService[i].split('-')[0]
                        dutyService_data.loginPhone = dutyService[i].split('-')[2]
                        dutyService_data.realName = dutyService[i].split('-')[1]

                        getAllDutyOfCustom_list.value.push(dutyService_data)
                        getAllDutyOfCustom_list2.value.push(dutyService_data)
                    }
                } else {

                    return ElMessage({
                        message: '出错啦，请联系管理员',
                        type: 'warning',
                    })
                }
            } else {
                getAllDutyOfCustom_list.value = []
                getAllDutyOfCustom_list2.value = []
            }

            if (data.serviceMan) {
             
                let serviceMan = data.serviceMan.split(',')
                if (serviceMan) {

                    let serviceMan_id = serviceMan[0].split('-')[0]
                    for (let i = 0; i < getServiceMans_list2.value.length; i++) {
                        if (serviceMan_id ==  getServiceMans_list2.value[i].ftUserId) {
                            let data = getServiceMans_list2.value[i]
                            add_data.serviceMan = data.ftUserId 
                        }




                    }


                } else {
                    return ElMessage({
                        message: '出错啦，请联系管理员',
                        type: 'warning',
                    })
                }

            }

        }
    }
   
}
//#endregion

//#region 负责人
const getAllDutyOfCustom_list = ref([])
const getAllDutyOfCustom_list2 = ref([])
const getAllDutyOfCustom_api = () => {
  
    getAllDutyOfCustom({
        
    }).then(res => {
        if (res.code == 1) {
            getAllDutyOfCustom_list.value = res.data;
            getAllDutyOfCustom_list2.value = res.data;
           
        }
    })
}
const getAllDutyOfCustom_handleFilter = (value) => {
    // 自定义筛选逻辑
    if (value) {
        let results = getAllDutyOfCustom_list2.value.filter(item => {
            for (let key in item) {
                if (typeof item[key] === 'string' && item[key].includes(value)) {
                    return true;
                }
            }
            return false;
        })
        if (results.length > 0) {
            getAllDutyOfCustom_list.value =results
        } else {
            getAllDutyOfCustom_list.value =[]
        }
    } else {
        getAllDutyOfCustom_list.value = getAllDutyOfCustom_list2.value
    }
}

//#endregion

//#region 业务员
const getServiceMans_list = ref([])
const getServiceMans_list2 = ref([])
const getServiceMans_api = () => {
  
    getServiceMans({
        
    }).then(res => {
        if (res.code == 1) {
            getServiceMans_list.value = res.data;
            getServiceMans_list2.value = res.data;
           
        }
    })
}
const getServiceMans_handleFilter = (value) => {
    // 自定义筛选逻辑
    if (value) {
        let results = getServiceMans_list2.value.filter(item => {
            for (let key in item) {
                if (typeof item[key] === 'string' && item[key].includes(value)) {
                    return true;
                }
            }
            return false;
        })
        if (results.length > 0) {
            getServiceMans_list.value =results
        } else {
            getServiceMans_list.value =[]
        }
    } else {
        getServiceMans_list.value = getServiceMans_list2.value
    }
}

//#endregion


//#region 修改
const retuen_data = ref({
    isReturnAdd: null,
    isReturn: null,
    returnId:null,
})
const getOrderInfo_data = ref({})
const up_getOrderInfo = () =>{
    let data =  getOrderInfo_data.value
    retuen_data.value.isReturnAdd = data.isReturnAdd
    retuen_data.value.isReturn = data.isReturn
    retuen_data.value.returnId = data.returnId
    console.log(data)
    if(data.routeSimpleName.includes('天府') || data.routeSimpleName.includes('双流')){
        activeName_tabs1.value = 'aircraft'
        if (data.routeSimpleName.includes('接')) { 
            if(data.routeSimpleName.includes('天府')){
                chartered_bus_off.value = true
                if(data.type == '0'){
                    aircraft_radio.value = '拼车'
                } else {
                    aircraft_radio.value = '包车'
                }
               

            }
            activeName_tabs2.value = 'aircraft_connect'
            // add_data.cusMobile = data.cusMobile
            // add_data.cusName = data.cusName
            add_data.days = data.days
            add_data.endTime = data.endTime
            add_data.flightDate = data.flightDate
            add_data.flightNum = data.flightNum
            add_data.flightTime = data.flightTime
            add_data.fromLocation = data.fromLocation
            add_data.fromLocationData = data.fromLocationData    
            add_data.fromLocationId = data.fromLocationId
            add_data.landDate = data.landDate
            add_data.needSeats = data.needSeats? data.needSeats:'0'
            add_data.priceNeedSeats = data.priceNeedSeats? data.priceNeedSeats:''
            add_data.carConfig = data.carConfig? data.carConfig:''

            
            

            add_data.personNum = data.personNum
            add_data.receiveMsg = data.receiveMsg
            add_data.remark = data.remark
            add_data.serviceManRemark = data.serviceManRemark
            add_data.driverRemark = data.driverRemark
            add_data.routeSimpleName = data.routeSimpleName
            add_data.startTime = data.startTime
            add_data.toLocation = data.toLocation
            add_data.toLocationData = data.toLocationData
            add_data.toLocationId = data.toLocationId
            add_data.userId = data.userId
            add_data.userId = data.userId
            add_data.useCarDutyUserId = data.useCarDutyUserId
            
            add_data.serviceMan = data.serviceMan.split('-')[0]


            add_data.type = data.type
            add_data.price = data.price
            add_data.ensureMoney  = data.ensureMoney 
            add_data.regularCarMoney  = data.regularCarMoney 
            add_data.points = data.points
            add_data.persons = data.persons
            add_data.id = data.id

            add_cusName_list.value = data.persons
            add_cusName_index.value = data.persons?data.persons.length:0
        
            passing_points_list.value = data.points
            passing_points_index.value =data.points?data.points.length:0
        }else if(data.routeSimpleName.includes('送')){
            if(data.routeSimpleName.includes('天府')){
                chartered_bus_off.value = true
                if(data.type == '0'){
                    aircraft_radio.value = '拼车'
                } else {
                    aircraft_radio.value = '包车'
                }
               

            }
            activeName_tabs2.value = 'aircraft_deliver'
            // add_data.cusMobile = data.cusMobile
            // add_data.cusName = data.cusName
            add_data.days = data.days
            add_data.endTime = data.endTime
            add_data.flightDate = data.flightDate
            add_data.flightNum = data.flightNum
            add_data.flightTime = data.flightTime
            add_data.fromLocation = data.fromLocation
            add_data.fromLocationData = data.fromLocationData    
            add_data.fromLocationId = data.fromLocationId
            add_data.landDate = data.landDate
            add_data.needSeats = data.needSeats? data.needSeats:'0'
            add_data.priceNeedSeats = data.priceNeedSeats? data.priceNeedSeats:''
            add_data.carConfig = data.carConfig? data.carConfig:''

            
            

            add_data.personNum = data.personNum
            add_data.receiveMsg = data.receiveMsg
            add_data.remark = data.remark
            add_data.serviceManRemark = data.serviceManRemark
            add_data.driverRemark = data.driverRemark
            add_data.routeSimpleName = data.routeSimpleName
            add_data.startTime = data.startTime
            add_data.toLocation = data.toLocation
            add_data.toLocationData = data.toLocationData
            add_data.toLocationId = data.toLocationId
            add_data.userId = data.userId
            add_data.userId = data.userId
            add_data.useCarDutyUserId = data.useCarDutyUserId
            add_data.serviceMan =  data.serviceMan.split('-')[0]
            add_data.type = data.type
            add_data.price = data.price
            add_data.ensureMoney  = data.ensureMoney 
            add_data.regularCarMoney  = data.regularCarMoney 
            add_data.points = data.points
            add_data.persons = data.persons
            add_data.id = data.id
            add_cusName_list.value = data.persons
            add_cusName_index.value = data.persons?data.persons.length:0
        
            passing_points_list.value = data.points
            passing_points_index.value =data.points?data.points.length:0
        }
    } else if (data.routeSimpleName.includes('东') || data.routeSimpleName.includes('南')|| data.routeSimpleName.includes('西')|| data.routeSimpleName.includes('北')) {
        activeName_tabs1.value = 'train'
        if (data.routeSimpleName.includes('接')) {
            activeName_tabs2.value = 'aircraft_connect'
            // add_data.cusMobile = data.cusMobile
            // add_data.cusName = data.cusName
            add_data.days = data.days
            add_data.endTime = data.endTime
            add_data.flightDate = data.flightDate
            add_data.flightNum = data.flightNum
            add_data.flightTime = data.flightTime
            add_data.fromLocation = data.fromLocation
            add_data.fromLocationData = data.fromLocationData    
            add_data.fromLocationId = data.fromLocationId
            add_data.landDate = data.landDate
            add_data.needSeats = data.needSeats? data.needSeats:'0'
            add_data.priceNeedSeats = data.priceNeedSeats? data.priceNeedSeats:''
            add_data.carConfig = data.carConfig? data.carConfig:''

            


            add_data.personNum = data.personNum
            add_data.receiveMsg = data.receiveMsg
            add_data.remark = data.remark
            add_data.serviceManRemark = data.serviceManRemark
            add_data.driverRemark = data.driverRemark
            add_data.routeSimpleName = data.routeSimpleName
            add_data.startTime = data.startTime
            add_data.toLocation = data.toLocation
            add_data.toLocationData = data.toLocationData
            add_data.toLocationId = data.toLocationId
            add_data.userId = data.userId
            add_data.userId = data.userId
            add_data.useCarDutyUserId = data.useCarDutyUserId
            add_data.serviceMan =  data.serviceMan.split('-')[0]
            add_data.type = data.type
            add_data.price = data.price
            add_data.ensureMoney  = data.ensureMoney 
            add_data.regularCarMoney  = data.regularCarMoney 
            add_data.points = data.points
            add_data.persons = data.persons
            add_data.id = data.id

            add_cusName_list.value = data.persons
            add_cusName_index.value = data.persons?data.persons.length:0
        
            passing_points_list.value = data.points
            passing_points_index.value =data.points?data.points.length:0
        }else if(data.routeSimpleName.includes('送')){
            activeName_tabs2.value = 'aircraft_deliver'
            // add_data.cusMobile = data.cusMobile
            // add_data.cusName = data.cusName
            add_data.days = data.days
            add_data.endTime = data.endTime
            add_data.flightDate = data.flightDate
            add_data.flightNum = data.flightNum
            add_data.flightTime = data.flightTime
            add_data.fromLocation = data.fromLocation
            add_data.fromLocationData = data.fromLocationData    
            add_data.fromLocationId = data.fromLocationId
            add_data.landDate = data.landDate
            add_data.needSeats = data.needSeats? data.needSeats:'0'
            add_data.priceNeedSeats = data.priceNeedSeats? data.priceNeedSeats:''
            add_data.carConfig = data.carConfig? data.carConfig:''

            


            add_data.personNum = data.personNum
            add_data.receiveMsg = data.receiveMsg
            add_data.remark = data.remark
            add_data.serviceManRemark = data.serviceManRemark
            add_data.driverRemark = data.driverRemark
            add_data.routeSimpleName = data.routeSimpleName
            add_data.startTime = data.startTime
            add_data.toLocation = data.toLocation
            add_data.toLocationData = data.toLocationData
            add_data.toLocationId = data.toLocationId
            add_data.userId = data.userId
            add_data.userId = data.userId
            add_data.useCarDutyUserId = data.useCarDutyUserId
            add_data.serviceMan =  data.serviceMan.split('-')[0]
            add_data.type = data.type
            add_data.price = data.price
            add_data.ensureMoney  = data.ensureMoney 
            add_data.regularCarMoney  = data.regularCarMoney 
            add_data.points = data.points
            add_data.persons = data.persons
            add_data.id = data.id
            add_cusName_list.value = data.persons
            add_cusName_index.value = data.persons?data.persons.length:0
        
            passing_points_list.value = data.points
            passing_points_index.value =data.points?data.points.length:0
        }
    } else if (data.routeSimpleName.includes('集合')) {
        activeName_tabs1.value = 'bus'
        if (data.routeSimpleName.includes('接')) {
            activeName_tabs2.value = 'aircraft_connect'
            // add_data.cusMobile = data.cusMobile
            // add_data.cusName = data.cusName
            add_data.days = data.days
            add_data.endTime = data.endTime
            add_data.flightDate = data.flightDate
            add_data.flightNum = data.flightNum
            add_data.flightTime = data.flightTime
            add_data.fromLocation = data.fromLocation
            add_data.fromLocationData = data.fromLocationData    
            add_data.fromLocationId = data.fromLocationId
            add_data.landDate = data.landDate
            add_data.needSeats = data.needSeats? data.needSeats:'0'
            add_data.priceNeedSeats = data.priceNeedSeats? data.priceNeedSeats:''
            add_data.carConfig = data.carConfig? data.carConfig:''

            


            add_data.personNum = data.personNum
            add_data.receiveMsg = data.receiveMsg
            add_data.remark = data.remark
            add_data.serviceManRemark = data.serviceManRemark
            add_data.driverRemark = data.driverRemark
            add_data.routeSimpleName = data.routeSimpleName
            add_data.startTime = data.startTime
            add_data.toLocation = data.toLocation
            add_data.toLocationData = data.toLocationData
            add_data.toLocationId = data.toLocationId
            add_data.userId = data.userId
            add_data.userId = data.userId
            add_data.useCarDutyUserId = data.useCarDutyUserId
            add_data.serviceMan =  data.serviceMan.split('-')[0]
            add_data.type = data.type
            add_data.price = data.price
            add_data.ensureMoney  = data.ensureMoney 
            add_data.regularCarMoney  = data.regularCarMoney 
            add_data.points = data.points
            add_data.persons = data.persons
            add_data.id = data.id

            add_cusName_list.value = data.persons
            add_cusName_index.value = data.persons?data.persons.length:0
        
            passing_points_list.value = data.points
            passing_points_index.value =data.points?data.points.length:0
        }else if(data.routeSimpleName.includes('送')){
            activeName_tabs2.value = 'aircraft_deliver'
            // add_data.cusMobile = data.cusMobile
            // add_data.cusName = data.cusName
            add_data.days = data.days
            add_data.endTime = data.endTime
            add_data.flightDate = data.flightDate
            add_data.flightNum = data.flightNum
            add_data.flightTime = data.flightTime
            add_data.fromLocation = data.fromLocation
            add_data.fromLocationData = data.fromLocationData    
            add_data.fromLocationId = data.fromLocationId
            add_data.landDate = data.landDate
            add_data.needSeats = data.needSeats? data.needSeats:'0'
            add_data.priceNeedSeats = data.priceNeedSeats? data.priceNeedSeats:''
            add_data.carConfig = data.carConfig? data.carConfig:''

            


            add_data.personNum = data.personNum
            add_data.receiveMsg = data.receiveMsg
            add_data.remark = data.remark
            add_data.serviceManRemark = data.serviceManRemark
            add_data.driverRemark = data.driverRemark
            add_data.routeSimpleName = data.routeSimpleName
            add_data.startTime = data.startTime
            add_data.toLocation = data.toLocation
            add_data.toLocationData = data.toLocationData
            add_data.toLocationId = data.toLocationId
            add_data.userId = data.userId
            add_data.userId = data.userId
            add_data.useCarDutyUserId = data.useCarDutyUserId
            add_data.serviceMan = data.serviceMan.split('-')[0]
            add_data.type = data.type
            add_data.price = data.price
            add_data.ensureMoney  = data.ensureMoney 
            add_data.regularCarMoney  = data.regularCarMoney 
            add_data.points = data.points
            add_data.persons = data.persons
            add_data.id = data.id
            add_cusName_list.value = data.persons
            add_cusName_index.value = data.persons?data.persons.length:0
        
            passing_points_list.value = data.points
            passing_points_index.value =data.points?data.points.length:0
        }
    }
    let stationListId = bus_list.value[0].id
    if (data.routeSimpleName.includes('接')) {
        for(let i =0;i<stationList.value.length;i++){
            if (add_data.fromLocation ==stationList.value[i].station_name ) {
                stationListId = stationList.value[i].id
                
            }
            
        }

   
   } else if (data.routeSimpleName.includes('送')) {


    for(let i =0;i<stationList.value.length;i++){
            if (add_data.toLocation ==stationList.value[i].station_name ) {
                stationListId = stationList.value[i].id
            }
            
        }

     
    }
   
   


    if (add_data.needSeats > 0) {
       let luser = JSON.parse(localStorage.getItem("luser"))
    let luser_companyNum = luser.companyNum
  
        getCarConfigurationType({
                stationListId: stationListId,
                addWay: '1',
                seats: add_data.needSeats,
                companyNum: luser_companyNum,
                orderType:'0',
            }).then(res => {

                if (res.code == 1) {
                    getCarConfigurationType_list.value = res.data
                } else {
                    add_data.needSeats = '0'
                    add_data.priceNeedSeats = ''
                    return ElMessage({
                        message: res.msg,
                        type: 'warning',
                    })
                }
            })
    }
    findComboCusList({
        find: '',
        page: {
            pageNum: 1,
            pageSize: 999,
        },
    }).then(res => {
        if (res.code == 1) {
            cusOptions.value = res.data;
            cusOptions2.value = res.data;
            let data222 = {}
    console.log(cusOptions2.value,'cusOptions2.value')
    if (data.virtuallyUseCarInfo) {
        for (let i = 0; i < cusOptions2.value.length; i++) {
        if(data.virtuallyUserId == cusOptions2.value[i].userId){
            data.userId = cusOptions2.value[i].userId
            data222 = cusOptions2.value[i]
            console.log(data222,'data222')


            getAllDutyOfCustom_list.value = []
            getAllDutyOfCustom_list2.value = []
            if (data222.dutyService) {
                let dutyService = data222.dutyService.split(',')
                if (dutyService) {
                    add_data.useCarDutyUserId = dutyService[0].split('-')[0]
                    for (let i = 0; i < dutyService.length; i++) {
                        let dutyService_data = {
                            ftUserId: '',
                            loginPhone: '',
                            realName: '',
                        }



                        dutyService_data.ftUserId = dutyService[i].split('-')[0]
                        dutyService_data.loginPhone = dutyService[i].split('-')[2]
                        dutyService_data.realName = dutyService[i].split('-')[1]

                        getAllDutyOfCustom_list.value.push(dutyService_data)
                        getAllDutyOfCustom_list2.value.push(dutyService_data)
                    }
                } else {

                    return ElMessage({
                        message: '出错啦，请联系管理员',
                        type: 'warning',
                    })
                }
            } else {
                getAllDutyOfCustom_list.value = []
                getAllDutyOfCustom_list2.value = []
            }

        }
      
    }

    }else{
        for (let i = 0; i < cusOptions2.value.length; i++) {
        if (  data.userId == cusOptions2.value[i].userId) {
            data222 = cusOptions2.value[i]
            console.log(data222,'data222')


            getAllDutyOfCustom_list.value = []
            getAllDutyOfCustom_list2.value = []
            if (data222.dutyService) {
                let dutyService = data222.dutyService.split(',')
                if (dutyService) {
                    add_data.useCarDutyUserId = dutyService[0].split('-')[0]
                    for (let i = 0; i < dutyService.length; i++) {
                        let dutyService_data = {
                            ftUserId: '',
                            loginPhone: '',
                            realName: '',
                        }



                        dutyService_data.ftUserId = dutyService[i].split('-')[0]
                        dutyService_data.loginPhone = dutyService[i].split('-')[2]
                        dutyService_data.realName = dutyService[i].split('-')[1]

                        getAllDutyOfCustom_list.value.push(dutyService_data)
                        getAllDutyOfCustom_list2.value.push(dutyService_data)
                    }
                } else {

                    return ElMessage({
                        message: '出错啦，请联系管理员',
                        type: 'warning',
                    })
                }
            } else {
                getAllDutyOfCustom_list.value = []
                getAllDutyOfCustom_list2.value = []
            }

         

        }
    }
    }
        }
    })

   
  


}
// #endregion

//#region 弹框控制
let props = defineProps(["data",'id']);
const emit = defineEmits(['myClick'])
const mer_off = ref(props.data)
const handleClose = () => {
    emit('myClick', false);
}
//#endregion

//#region tab导航栏
const activeName_tabs1 = ref('aircraft')
const activeName_tabs2 = ref('aircraft_connect')
const handleClick_tabs1 = (tab, event) => {
    console.log(tab, event)
    console.log(tab.props.name)
    resetForm()
    aircraft_radio.value = '包车'
    chartered_bus_off.value = false
    if (tab.props.name == 'aircraft') {
        activeName_tabs2.value = 'aircraft_connect'
    } else if (tab.props.name == 'train') {
        activeName_tabs2.value = 'aircraft_connect'
    } else if (tab.props.name == 'bus') {
        activeName_tabs2.value = 'aircraft_connect'
    }
}
const handleClick_tabs2 = (tab, event) => {
    console.log(tab, event)
    resetForm()
    aircraft_radio.value = '包车'
    chartered_bus_off.value = false
}
const aircraft_name = ref('飞机')
const train_name = ref('火车')
const bus_name = ref('大巴')

//#endregion

//#region 添加途径点
const passing_points_list = ref([])
const passing_points_index = ref(0)
const passing_points_off = ref('')
const passing_points_list2 = ref([])
const passing_points_index2 = ref(0)
const add_passing_points = (e) => {
    if (e == 2) {
        passing_points_off.value = '2'
    } else {
        passing_points_off.value = '1'
    }
    // 地图
    window._AMapSecurityConfig = {
        securityJsCode: securityJsCode,
    }
    // 首次加载
    AMapLoader.load({
        key: key,
        version: '2.0',
        plugins: ['AMap.Driving', 'AMap.Geolocation', 'AMap.Scale', 'AMap.AutoComplete', 'AMap.PlaceSearch'],
    }).then((AMap) => {
        // 初始化-地图对象
        myMap.value = new AMap.Map('myMap', { zoom: 10, center: [104.065861, 30.657401] });




    }).catch(err => { console.log('高德地图加载失败：', err); });
    map_address.value = ''
    map_value.value = {}
    map_address_list.value = ''
    map_off.value = true
}
const passing_points_index_delbtn = (index) => {
    passing_points_index.value -= 1
    passing_points_list.value.splice(index, 1)
}
const passing_points_index_delbtn2 = (index) => {
    passing_points_index2.value -= 1
    passing_points_list2.value.splice(index, 1)
}
//#endregion

// #region 大巴地图选择
const bus_map_num = ref('')
const bus_map_off_btn = (e) => {
    bus_map_num.value = e
    // 地图
    window._AMapSecurityConfig = {
        securityJsCode: securityJsCode,
    }
    // 首次加载
    AMapLoader.load({
        key: key,
        version: '2.0',
        plugins: ['AMap.Driving', 'AMap.Geolocation', 'AMap.Scale', 'AMap.AutoComplete', 'AMap.PlaceSearch'],
    }).then((AMap) => {
        // 初始化-地图对象
        myMap.value = new AMap.Map('myMap', { zoom: 10, center: [104.065861, 30.657401] });

    }).catch(err => { console.log('高德地图加载失败：', err); });
    map_address.value = ''
    map_value.value = {}
    map_address_list.value = ''
    map_off.value = true
}
// #endregion

//#region 添加联系人
const add_cusName_list = ref([])
const add_cusName_index = ref(0)
const add_cusName_off = ref('')
const add_cusName_list2 = ref([])
const add_cusName_index2 = ref(0)

const add_cusName_index_delbtn = (index) => {
    add_cusName_index.value -= 1
    add_cusName_list.value.splice(index, 1)

}
const add_cusName_index_delbtn2 = (index) => {
    add_cusName_index2.value -= 1
    add_cusName_list2.value.splice(index, 1)

}
const add_cusName_btn = (e) => {
    let p = {
        name: '',
        mobile: '',
    }
    if (e == 1) {
        add_cusName_list.value.push(p)
        add_cusName_index.value += 1
    } else if (e == 2) {
        add_cusName_list2.value.push(p)
        add_cusName_index2.value += 1
    }

}
//#endregion

//#region 是否返程
const isReturn_list = reactive([
    {
        value: 'true',
        label: '是',
    },
    {
        value: 'false',
        label: '否',
    },
])
const isReturnAdd_change = (e) => {
    if (e == 'true') {
           if (add_data.routeSimpleName.includes('接')) {
            add_data.returnOrder.fromLocation = add_data.toLocation
            add_data.returnOrder.fromLocationId = add_data.toLocationId
            add_data.returnOrder.fromLocationData.address = add_data.toLocationData.address
            add_data.returnOrder.fromLocationData.area = add_data.toLocationData.area
            add_data.returnOrder.fromLocationData.id = add_data.toLocationData.id
            add_data.returnOrder.fromLocationData.isSta = add_data.toLocationData.isSta
            add_data.returnOrder.fromLocationData.lnglat = add_data.toLocationData.lnglat
            add_data.returnOrder.fromLocationData.name = add_data.toLocationData.name
            add_data.returnOrder.fromLocationData.tel = add_data.toLocationData.tel
            add_data.returnOrder.fromLocationData.type = add_data.toLocationData.type

            add_data.returnOrder.toLocation = add_data.fromLocation
            add_data.returnOrder.toLocationId = add_data.fromLocationId
            add_data.returnOrder.toLocationData.address = add_data.fromLocationData.address
            add_data.returnOrder.toLocationData.area = add_data.fromLocationData.area
            add_data.returnOrder.toLocationData.id = add_data.fromLocationData.id
            add_data.returnOrder.toLocationData.isSta = add_data.fromLocationData.isSta
            add_data.returnOrder.toLocationData.lnglat = add_data.fromLocationData.lnglat
            add_data.returnOrder.toLocationData.name = add_data.fromLocationData.name
            add_data.returnOrder.toLocationData.tel = add_data.fromLocationData.tel
            add_data.returnOrder.toLocationData.type = add_data.fromLocationData.type

        } else {
            add_data.returnOrder.toLocation = add_data.fromLocation
            add_data.returnOrder.toLocationId = add_data.fromLocationId
            add_data.returnOrder.toLocationData.address = add_data.fromLocationData.address
            add_data.returnOrder.toLocationData.area = add_data.fromLocationData.area
            add_data.returnOrder.toLocationData.id = add_data.fromLocationData.id
            add_data.returnOrder.toLocationData.isSta = add_data.fromLocationData.isSta
            add_data.returnOrder.toLocationData.lnglat = add_data.fromLocationData.lnglat
            add_data.returnOrder.toLocationData.name = add_data.fromLocationData.name
            add_data.returnOrder.toLocationData.tel = add_data.fromLocationData.tel
            add_data.returnOrder.toLocationData.type = add_data.fromLocationData.type

            add_data.returnOrder.fromLocation = add_data.toLocation
            add_data.returnOrder.fromLocationId = add_data.toLocationId
            add_data.returnOrder.fromLocationData.address = add_data.toLocationData.address
            add_data.returnOrder.fromLocationData.area = add_data.toLocationData.area
            add_data.returnOrder.fromLocationData.id = add_data.toLocationData.id
            add_data.returnOrder.fromLocationData.isSta = add_data.toLocationData.isSta
            add_data.returnOrder.fromLocationData.lnglat = add_data.toLocationData.lnglat
            add_data.returnOrder.fromLocationData.name = add_data.toLocationData.name
            add_data.returnOrder.fromLocationData.tel = add_data.toLocationData.tel
            add_data.returnOrder.fromLocationData.type = add_data.toLocationData.type
        }


        add_data.returnOrder.flightNum = add_data.flightNum
        add_data.returnOrder.personNum = add_data.personNum
        add_data.returnOrder.needSeats = add_data.needSeats
        add_data.returnOrder.priceNeedSeats = add_data.priceNeedSeats
        add_data.returnOrder.carConfig = add_data.carConfig


        add_data.returnOrder.cusName = add_data.cusName
        add_data.returnOrder.cusMobile = add_data.cusMobile
        add_data.returnOrder.remark = add_data.remark
        add_data.returnOrder.serviceManRemark = add_data.serviceManRemark
        add_data.returnOrder.driverRemark = add_data.driverRemark
        add_data.returnOrder.userId = add_data.userId
        add_data.returnOrder.useCarDutyUserId = data.useCarDutyUserId
            add_data.returnOrder.serviceMan = data.serviceMan.split('-')[0]

        add_cusName_list2.value = add_cusName_list.value
        add_cusName_index2.value = add_cusName_index.value
        
        passing_points_list2.value = passing_points_list.value
        passing_points_index2.value = passing_points_index.value

        
    }
}
//#endregion

//#region 地图
const myMap = ref('')
const map_address = ref('')
const map_address_list = ref([])
const map_value = ref({})
const marker = ref('')
const map_off = ref(false)
const isReturn_map_off = ref('') // 1:正常订单 2：返程订单
const map_off_btn = (e) => {
    if (e == 2) {
        isReturn_map_off.value = '2'
    } else {
        isReturn_map_off.value = '1'
    }
    // 地图
    window._AMapSecurityConfig = {
        securityJsCode: securityJsCode,
    }
    // 首次加载
    AMapLoader.load({
        key: key,
        version: '2.0',
        plugins: ['AMap.Driving', 'AMap.Geolocation', 'AMap.Scale', 'AMap.AutoComplete', 'AMap.PlaceSearch'],
    }).then((AMap) => {
        // 初始化-地图对象
        myMap.value = new AMap.Map('myMap', { zoom: 10, center: [104.065861, 30.657401] });

    }).catch(err => { console.log('高德地图加载失败：', err); });

    map_address.value = ''
    map_value.value = {}
    map_address_list.value = ''
    map_off.value = true
}
const map_change = () => {


    findMapPointList({
        city: '成都',
        isFindSta: '0',
        keywords: map_address.value,

    }).then(res => {
        map_address_list.value = res.data.slice(0, 5)
    })
}

const map_list_btn = (e) => {
    map_address.value = e.area + '-' + e.name + '-' + e.address
    map_value.value = e
    let lnglat = [e.lnglat.split(',')[0], e.lnglat.split(',')[1]]
    myMap.value.panTo(lnglat);
    if (marker.value) {
        myMap.value.remove(marker.value);
    }
    myMap.value.setFitView();
    marker.value = new AMap.Marker({
        map: myMap.value,
        position: lnglat,
    });
    myMap.value.setFitView();
    myMap.value.add(marker.value);

}

const map_ok_btn = () => {
    console.log(map_value.value)
    if (isReturn_map_off.value == '1') {
        // 正常
        if (add_data.routeSimpleName.includes('接')) {
            // 接
            add_data.toLocation = map_value.value.name
            add_data.toLocationData = map_value.value

        } else {
            add_data.fromLocation = map_value.value.name
            add_data.fromLocationData = map_value.value
        }
    } else if (isReturn_map_off.value == '2') {
        // 返程
        if (add_data.routeSimpleName.includes('接')) {
            add_data.returnOrder.fromLocation = map_value.value.name
            add_data.returnOrder.fromLocationData = map_value.value
        } else {
            // 接
            add_data.returnOrder.toLocation = map_value.value.name
            add_data.returnOrder.toLocationData = map_value.value
        }
    } else if (passing_points_off.value == '1') {
        passing_points_list.value.push(map_value.value)
        passing_points_index.value += 1
    } else if (passing_points_off.value == '2') {
        passing_points_list2.value.push(map_value.value)
        passing_points_index2.value += 1
    } else if (bus_map_num.value == '1') {
        add_data.fromLocation = map_value.value.name
        add_data.fromLocationData = map_value.value

    } else if (bus_map_num.value == '2') {
        add_data.toLocation = map_value.value.name
        add_data.toLocationData = map_value.value
    } else if (bus_map_num.value == '3') {
        add_data.returnOrder.fromLocation = map_value.value.name
        add_data.returnOrder.fromLocationData = map_value.value
    } else if (bus_map_num.value == '4') {
        add_data.returnOrder.toLocation = map_value.value.name
        add_data.returnOrder.toLocationData = map_value.value
    }


    // cat_map.value = '0'

    bus_map_num.value = ''
    passing_points_off.value = ''
    isReturn_map_off.value = ''
    map_off.value = false

}
//#endregion

//#region 订单数据
const title = ref('修改订单')
const add_data = reactive({
    cusMobile: '', // 乘车人电话
    cusName: '', // 乘车人
    days: '',
    endTime: '',
    flightDate: '',// 航班起飞时间 yyyy-MM-dd HH:mm
    flightNum: "",// 航班号
    flightTime: '',
    fromLocation: "",// 出发地名称
    fromLocationData: {
        address: '',
        area: '',
        id: "",
        isSta: "",
        lnglat: "",
        name: "",
        tel: "",
        type: ""
    },// 出发地
    fromLocationId: '',// 出发地主数据id(接天府肯定有)
    // isHighSpeed: '1',
    isReturnAdd: "false",// 是否返程,true,false
    isReturn: "false",// 是否返程,true,false
    landDate: '',// 航班降落时间 yyyy-MM-dd HH:mm
    needSeats: '0',
    priceNeedSeats: '',
     carConfig:'',
    personNum: '',// 预约人数
    receiveMsg: 'false',// true通知,false不通知
    remark: '',// 备注
    serviceManRemark: '',// 备注serviceManRemark
    driverRemark:'',
    returnTime: '',// 返程时间,yyyy-MM-dd HH:mm:ss
    routeSimpleName: '',// 行程简称,拼车接天府/拼送天府
    startTime: '',
    toLocation: '',// 目的地名称
    toLocationData: {
        address: '',
        area: '',
        id: "",
        isSta: "",
        lnglat: "",
        name: "",
        tel: "",
        type: ""
    },// 目的地
    toLocationId: '',// 目的地主数据id(送天府肯定有)
    userId: '',// 用户Id,对应Customers表数据的id
    userId: '',
    useCarDutyUserId:'',
    useCarCompanyName:'',
    useCarDutyInfo:'',
        serviceMan:'',
    type: '',
    price: '',
    ensureMoney : '',
    regularCarMoney : '',
    points: [],
    persons: [],
    id: '',
    returnOrder: {
        cusMobile: '', // 乘车人电话
        cusName: '', // 乘车人
        days: '',
        endTime: '',
        flightDate: '',// 航班起飞时间 yyyy-MM-dd HH:mm
        flightNum: "",// 航班号
        flightTime: '',
        fromLocation: "",// 出发地名称
        fromLocationData: {
            address: '',
            area: '',
            id: "",
            isSta: "",
            lnglat: "",
            name: "",
            tel: "",
            type: ""
        },// 出发地
        fromLocationId: '',// 出发地主数据id(接天府肯定有)
        // isHighSpeed: '1',
        landDate: '',// 航班降落时间 yyyy-MM-dd HH:mm
        needSeats: '0',
        priceNeedSeats: '',
         carConfig:'',
        personNum: '',// 预约人数
        receiveMsg: 'false',// true通知,false不通知
        remark: '',// 备注
    serviceManRemark: '',// 备注serviceManRemark
    driverRemark:'',
        returnTime: '',// 返程时间,yyyy-MM-dd HH:mm:ss
        routeSimpleName: '',// 行程简称,拼车接天府/拼送天府
        startTime: '',
        toLocation: '',// 目的地名称
        toLocationData: {
            address: '',
            area: '',
            id: "",
            isSta: "",
            lnglat: "",
            name: "",
            tel: "",
            type: ""
        },// 目的地
        toLocationId: '',// 目的地主数据id(送天府肯定有)
        userId: '',// 用户Id,对应Customers表数据的id
        userId: '',
        useCarDutyUserId:'',
        useCarCompanyName:'',
    useCarDutyInfo:'',
        serviceMan:'',
        type: '',
        price: '',
    ensureMoney : '',
    regularCarMoney : '',
        points: [],
        persons: [],
    },
})

const select_Btn = (e) => {
    console.log(add_data.routeSimpleName)
    if (add_data.routeSimpleName.includes('接')) {
        let list = {}
        for (let i = 0; i < getStationList_Data.value.length; i++) {
            if (e == getStationList_Data.value[i].stationName) {
                list = getStationList_Data.value[i]
            }

        }
        add_data.toLocation = list.stationName
        add_data.toLocationData.address = list.address
        add_data.toLocationData.id = list.id
        add_data.toLocationData.lnglat = list.lngLat
        add_data.toLocationData.tel = list.hotelLinkPhone
    } else {
        let list = {}
        for (let i = 0; i < getStationList_Data.value.length; i++) {
            if (e == getStationList_Data.value[i].stationName) {
                list = getStationList_Data.value[i]
            }

        }
        add_data.fromLocation = list.stationName
        add_data.fromLocationData.address = list.address
        add_data.fromLocationData.id = list.id
        add_data.fromLocationData.lnglat = list.lngLat
        add_data.fromLocationData.tel = list.hotelLinkPhone

    }

}

const bus_select_Btn1 = (e) => {
    if (add_data.routeSimpleName.includes('接')) {

        let list = {}
        for (let i = 0; i < getStationList_Data.value.length; i++) {
            if (e == getStationList_Data.value[i].stationName) {
                list = getStationList_Data.value[i]
            }

        }
        add_data.fromLocation = list.stationName
        add_data.fromLocationData.address = list.address
        add_data.fromLocationData.id = list.id
        add_data.fromLocationData.lnglat = list.lngLat
        add_data.fromLocationData.tel = list.hotelLinkPhone
   
    } else {
        let list = {}
        for (let i = 0; i < getStationList_Data.value.length; i++) {
            if (e == getStationList_Data.value[i].stationName) {
                list = getStationList_Data.value[i]
            }

        }
        add_data.toLocation = list.stationName
        add_data.toLocationData.address = list.address
        add_data.toLocationData.id = list.id
        add_data.toLocationData.lnglat = list.lngLat
        add_data.toLocationData.tel = list.hotelLinkPhone
      
    }
}
const bus_select_Btn2 = (e) => {
    if (add_data.routeSimpleName.includes('送')) {

let list = {}
for (let i = 0; i < getStationList_Data.value.length; i++) {
    if (e == getStationList_Data.value[i].stationName) {
        list = getStationList_Data.value[i]
    }

}
add_data.fromLocation = list.stationName
add_data.fromLocationData.address = list.address
add_data.fromLocationData.id = list.id
add_data.fromLocationData.lnglat = list.lngLat
add_data.fromLocationData.tel = list.hotelLinkPhone


} else {

let list = {}
for (let i = 0; i < getStationList_Data.value.length; i++) {
    if (e == getStationList_Data.value[i].stationName) {
        list = getStationList_Data.value[i]
    }

}
add_data.toLocation = list.stationName
add_data.toLocationData.address = list.address
add_data.toLocationData.id = list.id
add_data.toLocationData.lnglat = list.lngLat
add_data.toLocationData.tel = list.hotelLinkPhone

}
}
const select_Btn2 = (e) => {
    if (add_data.routeSimpleName.includes('接')) {
        let list = {}
        for (let i = 0; i < getStationList_Data.value.length; i++) {
            if (e == getStationList_Data.value[i].stationName) {
                list = getStationList_Data.value[i]
            }
            
        }
        add_data.returnOrder.fromLocation = list.stationName
        add_data.returnOrder.fromLocationData.address = list.address
        add_data.returnOrder.fromLocationData.id = list.id
        add_data.returnOrder.fromLocationData.lnglat = list.lngLat
        add_data.returnOrder.fromLocationData.tel = list.hotelLinkPhone

    } else {
        let list = {}
        for (let i = 0; i < getStationList_Data.value.length; i++) {
            if (e == getStationList_Data.value[i].stationName) {
                list = getStationList_Data.value[i]
            }

        }

        add_data.returnOrder.toLocation = list.stationName
        add_data.returnOrder.toLocationData.address = list.address
        add_data.returnOrder.toLocationData.id = list.id
        add_data.returnOrder.toLocationData.lnglat = list.lngLat
        add_data.returnOrder.toLocationData.tel = list.hotelLinkPhone
    }

}

//#endregion

//#region 包车拼车
const aircraft_radio = ref('包车')
const aircraft_radio2 = ref('包车')
const chartered_bus_off = ref(false) // 包车拼车开关
const chartered_bus_off2 = ref(false)
const aircraft_connect_change = (e) => {
    aircraft_radio.value = '包车'
    if (e.includes('天府') && e.includes('机场')) {
        chartered_bus_off.value = true
    } else {
        chartered_bus_off.value = false
    }

}
const aircraft_connect_change2 = (e) => {
    aircraft_radio2.value = '包车'
    if (e.includes('天府') && e.includes('机场')) {
        chartered_bus_off2.value = true
    } else {
        chartered_bus_off2.value = false
    }
}
//#endregion

//#region 航班查询
const land_se_off = ref(false)
const land_se = reactive({
    date: '',
    num: '',
    travelWay: '1'
})
const land_se_btn_num = ref('1')
const land_se_btn = (e) => {
    if (e == 2) {
        land_se.date = ''
        land_se.num = ''
        land_se_list.value = {}
        land_se_btn_num.value = '2'
        land_se_off.value = true
    } else {
        land_se.date = ''
        land_se.num = ''
        land_se_list.value = {}
        land_se_btn_num.value = '1'
        land_se_off.value = true
    }
}
const land_se_list = ref({})

const ok_land_se_btn = () => {
    if (!land_se.date) {
        return ElMessage({
            message: '请输入航班时间',
            type: 'warning',
        })
    } else if (!land_se.num) {
        return ElMessage({
            message: '请输入航班号',
            type: 'warning',
        })
    }

    findTravelWayInfo(land_se).then(res => {
        if (res.code == 1) {
            res.data.data.list[0].arrScheduled = land_se.date + ' ' + res.data.data.list[0].arrScheduled.split(' ')[1]
            res.data.data.list[0].depScheduled = land_se.date + ' ' + res.data.data.list[0].depScheduled.split(' ')[1]
            land_se_list.value = res.data.data.list[0]
            if (!land_se_list.value.arrTerminal) {
                land_se_list.value.arrTerminal = '1'
            }
            if (!land_se_list.value.depTerminal) {
                land_se_list.value.depTerminal = '1'
            }
            return ElMessage({
                message: res.msg,
                type: 'success',
            })
        } else {
            return ElMessage({
                message: res.msg,
                type: 'warning',
            })
        }
    })
}


const land_se_list_btn = (e) => {
    if (land_se_btn_num.value == '2') {


        if (add_data.routeSimpleName.includes('接')) {
            if (land_se_list.value.depPort.includes('天府')) {
                add_data.returnOrder.flightNum = land_se_list.value.flightNo
                add_data.returnOrder.flightDate = add4hours(land_se_list.value.depScheduled)
                add_data.returnOrder.landDate = add30Minutes(land_se_list.value.depScheduled)
                add_data.returnOrder.toLocation = '简阳天府机场T' + land_se_list.value.depTerminal

            } else if (land_se_list.value.depPort.includes('双流')) {
                add_data.returnOrder.flightNum = land_se_list.value.flightNo
                add_data.returnOrder.flightDate = add4hours(land_se_list.value.depScheduled)
                add_data.returnOrder.landDate = add30Minutes(land_se_list.value.depScheduled)
                add_data.returnOrder.toLocation = '成都双流机场T' + land_se_list.value.depTerminal
            } else {
                return ElMessage({
                    message: '该机场未开通送机服务！',
                    type: 'warning',
                })
            }
        } else if (add_data.routeSimpleName.includes('送')) {
            if (land_se_list.value.arrPort.includes('天府')) {
                add_data.returnOrder.flightNum = land_se_list.value.flightNo
                add_data.returnOrder.flightDate = add4hours(land_se_list.value.arrScheduled)
                add_data.returnOrder.landDate = add30Minutes(land_se_list.value.arrScheduled)
                add_data.returnOrder.fromLocation = '简阳天府机场T' + land_se_list.value.arrTerminal

            } else if (land_se_list.value.arrPort.includes('双流')) {
                add_data.returnOrder.flightNum = land_se_list.value.flightNo
                add_data.returnOrder.flightDate = add4hours(land_se_list.value.arrScheduled)
                add_data.returnOrder.landDate = add30Minutes(land_se_list.value.arrScheduled)
                add_data.returnOrder.fromLocation = '成都双流机场T' +  land_se_list.value.arrTerminal
            } else {
                return ElMessage({
                    message: '该机场未开通送机服务！',
                    type: 'warning',
                })
            }
        }
    } else {
        if (add_data.routeSimpleName.includes('接')) {
          
            if (land_se_list.value.arrPort.includes('天府')) {
                add_data.flightNum = land_se_list.value.flightNo
                add_data.flightDate = add4hours(land_se_list.value.arrScheduled)
                add_data.landDate = add30Minutes(land_se_list.value.arrScheduled)
                add_data.fromLocation = '简阳天府机场T' + land_se_list.value.arrTerminal

            } else if (land_se_list.value.arrPort.includes('双流')) {
                add_data.flightNum = land_se_list.value.flightNo
                add_data.flightDate = add4hours(land_se_list.value.arrScheduled)
                add_data.landDate = add30Minutes(land_se_list.value.arrScheduled)
                add_data.fromLocation = '成都双流机场T' + land_se_list.value.arrTerminal
            } else {
                return ElMessage({
                    message: '该机场未开通送机服务！',
                    type: 'warning',
                })
            }
        } else if (add_data.routeSimpleName.includes('送')) {
      
            if (land_se_list.value.depPort.includes('天府')) {
                add_data.flightNum = land_se_list.value.flightNo
                add_data.flightDate = add4hours(land_se_list.value.depScheduled)
                add_data.landDate = add30Minutes(land_se_list.value.depScheduled)
                add_data.toLocation = '简阳天府机场T' + land_se_list.value.depTerminal

            } else if (land_se_list.value.depPort.includes('双流')) {
                add_data.flightNum = land_se_list.value.flightNo
                add_data.flightDate = add4hours(land_se_list.value.depScheduled)
                add_data.landDate = add30Minutes(land_se_list.value.depScheduled)
                add_data.toLocation = '成都双流机场T' + land_se_list.value.depTerminal
            } else {
                return ElMessage({
                    message: '该机场未开通送机服务！',
                    type: 'warning',
                })
            }
        }



    }


    land_se_off.value = false
}
watch(() => add_data.fromLocation, () => {

    if (add_data.routeSimpleName.includes('接') && add_data.fromLocation.includes('天府') && add_data.fromLocation.includes('机场')) {
        chartered_bus_off.value = true
        console.log(chartered_bus_off2.value)
    }
},{ immediate: true, deep: true })
watch(() => add_data.toLocation, () => {
    if (add_data.routeSimpleName.includes('送') && add_data.toLocation.includes('天府') && add_data.fromLocation.includes('机场')) {
        chartered_bus_off.value = true
    }
},{ immediate: true, deep: true })
watch(() => add_data.returnOrder.fromLocation, () => {
    if (add_data.routeSimpleName.includes('接') && add_data.returnOrder.fromLocation.includes('天府') && add_data.fromLocation.includes('机场')) {
        chartered_bus_off2.value = true
    }
},{ immediate: true, deep: true })
watch(() => add_data.returnOrder.toLocation, () => {
    if (add_data.routeSimpleName.includes('送') && add_data.returnOrder.toLocation.includes('天府') && add_data.fromLocation.includes('机场')) {
        chartered_bus_off2.value = true
    }
},{ immediate: true, deep: true })
//#endregion

//#region 列车查询
const train_se_off = ref(false)
const train_se = reactive({
    date: '',
    num: '',
    travelWay: '2'
})
const train_se_btn_num = ref('1')
const train_se_btn = (e) => {
    if (e == 2) {
        queryNow_list.value = []
        train_se.date = ''
        train_se.num = ''
        train_se_list.value = {}
        train_se_btn_num.value = '2'
        train_se_off.value = true
    } else {
        queryNow_list.value = []
        train_se.date = ''
        train_se.num = ''
        train_se_list.value = {}
        train_se_btn_num.value = '1'
        train_se_off.value = true
    }
}
const train_se_list = ref({})
const queryNow_list =ref([])
const ok_train_se_btn = () => {
    if (!train_se.date) {
        return ElMessage({
            message: '请输入航班时间',
            type: 'warning',
        })
    } else if (!train_se.num) {
        return ElMessage({
            message: '请输入航班号',
            type: 'warning',
        })
    }

    findTravelWayInfo(train_se).then(res => {
        if (res.code == 1) {
            // res.data.data.list[0].arrScheduled = land_se.date + ' ' + res.data.data.list[0].arrScheduled.split(' ')[1]
            // res.data.data.list[0].depScheduled = land_se.date + ' ' + res.data.data.list[0].depScheduled.split(' ')[1]
            train_se_list.value = res.data.data
            queryNow_list.value = res.data.data.list
            return ElMessage({
                message: res.msg,
                type: 'success',
            })
        } else {
            return ElMessage({
                message: res.msg,
                type: 'warning',
            })
        }
    })
}




const time_fun = (e) => {
		let datatime1 = e.departuretime
		let datatime2 = e.arrivaltime
		let parts1 = datatime1.split(':')
		let parts2 = datatime2.split(':')
		let num1 = parseInt(parts1[0]) * 60 + parseInt(parts1[1])
		let num2 = parseInt(parts2[0]) * 60 + parseInt(parts2[1])
		let difference = Math.abs(num1 - num2);
		return difference
	}

const fa_btn = (e) => {
    let timedate = train_se.date + ' ' + e.departuretime
    if (e.station.includes('成都')) {

        if (train_se_btn_num.value == '2') {
            if (add_data.routeSimpleName.includes('接')) {
                
                if (e.station.includes('东')) {
                add_data.returnOrder.flightNum = train_se_list.value.trainno
                add_data.returnOrder.flightDate = add15Minutes(timedate)
                add_data.returnOrder.toLocation = '成都东站'
                    
            } else if (e.station.includes('西')) {
                add_data.returnOrder.flightNum = train_se_list.value.trainno
                add_data.returnOrder.flightDate = add15Minutes(timedate)
                add_data.returnOrder.toLocation = '成都西站'
            }  else if (e.station.includes('南')) {
                add_data.returnOrder.flightNum = train_se_list.value.trainno
                add_data.returnOrder.flightDate = add15Minutes(timedate)
                add_data.returnOrder.toLocation = '成都南站'
            } else if (e.station.includes('北')) {
                add_data.returnOrder.flightNum = train_se_list.value.trainno
                add_data.returnOrder.flightDate = add15Minutes(timedate)
                add_data.returnOrder.toLocation = '成都北站'
            } 
            train_se_off.value = false
            } else {
                return ElMessage({
            message: '当前为接火车，请选择进站',
            type: 'warning',
        })
           }
        } else {
            if (add_data.routeSimpleName.includes('送')) {
                if (e.station.includes('东')) {
                add_data.flightNum = train_se_list.value.trainno
                add_data.flightDate = add2hours(timedate)
                add_data.toLocation = '成都东站'

            } else if (e.station.includes('西')) {
                add_data.flightNum = train_se_list.value.trainno
                add_data.flightDate = add2hours(timedate)
                add_data.toLocation = '成都西站'
            }  else if (e.station.includes('南')) {
                add_data.flightNum = train_se_list.value.trainno
                add_data.flightDate = add2hours(timedate)
                add_data.toLocation = '成都南站'
            } else if (e.station.includes('北')) {
                add_data.flightNum = train_se_list.value.trainno
                add_data.flightDate = add2hours(timedate)
                add_data.toLocation = '成都北站'
            } 
            train_se_off.value = false
            } else {
                return ElMessage({
            message:  '当前为接火车，请选择进站',
            type: 'warning',
        })
        }
        }



    } else {
        return ElMessage({
            message: e.station + '业务暂未开通',
            type: 'warning',
        })
    }
}
const jin_btn = (e) => {

    let timedate = train_se.date + ' ' + e.departuretime
    if (e.station.includes('成都')) {

        if (train_se_btn_num.value == '2') {
            if (add_data.routeSimpleName.includes('送')) {
                
                if (e.station.includes('东')) {
                add_data.returnOrder.flightNum = train_se_list.value.trainno
                add_data.returnOrder.landDate = add2hours(timedate)
                add_data.returnOrder.fromLocation = '成都东站'

            } else if (e.station.includes('西')) {
                add_data.returnOrder.flightNum = train_se_list.value.trainno
                add_data.returnOrder.landDate = add2hours(timedate)
                add_data.returnOrder.fromLocation = '成都西站'
            }  else if (e.station.includes('南')) {
                add_data.returnOrder.flightNum = train_se_list.value.trainno
                add_data.returnOrder.landDate = add2hours(timedate)
                add_data.returnOrder.fromLocation = '成都南站'
            } else if (e.station.includes('北')) {
                add_data.returnOrder.flightNum = train_se_list.value.trainno
                add_data.returnOrder.landDate = add2hours(timedate)
                add_data.returnOrder.fromLocation = '成都北站'
            } 
            train_se_off.value = false
            } else {
                return ElMessage({
            message: '当前为送火车，请选择发车',
            type: 'warning',
        })
           }
        } else {
            if (add_data.routeSimpleName.includes('接')) {
                if (e.station.includes('东')) {
                add_data.flightNum = train_se_list.value.trainno
                add_data.landDate = add15Minutes(timedate)
                add_data.fromLocation = '成都东站'

            } else if (e.station.includes('西')) {
                add_data.flightNum = train_se_list.value.trainno
                add_data.landDate = add15Minutes(timedate)
                add_data.fromLocation = '成都西站'
            }  else if (e.station.includes('南')) {
                add_data.flightNum = train_se_list.value.trainno
                add_data.landDate = add15Minutes(timedate)
                add_data.fromLocation = '成都南站'
            } else if (e.station.includes('北')) {
                add_data.flightNum = train_se_list.value.trainno
                add_data.landDate = add15Minutes(timedate)
                add_data.fromLocation = '成都北站'
            } 
            train_se_off.value = false
            } else {
                return ElMessage({
            message: '当前为送火车，请选择发车',
            type: 'warning',
        })
        }
        }



    } else {
        return ElMessage({
            message: e.station + '业务暂未开通',
            type: 'warning',
        })
    }
}
//#endregion


//#region 表单重置
const resetForm = () => {
    add_data.cusMobile = ''
    add_data.cusName = ''
    add_data.flightDate = ''
    add_data.flightNum = ''
    add_data.fromLocation = ''
    add_data.fromLocationData.address = ''
    add_data.fromLocationData.area = ''
    add_data.fromLocationData.id = ''
    add_data.fromLocationData.isSta = ''
    add_data.fromLocationData.lnglat = ''
    add_data.fromLocationData.name = ''
    add_data.fromLocationData.tel = ''
    add_data.fromLocationData.type = ''
    add_data.fromLocationId = ''
    add_data.isReturn = 'false'
    add_data.endTime = ''
    add_data.startTime = ''
    add_data.landDate = ''
    add_data.personNum = ''
    add_data.receiveMsg = ''
    add_data.remark = ''
    add_data.serviceManRemark = ''
        add_data.driverRemark = ''
    add_data.returnTime = ''
    add_data.routeSimpleName = ''
    add_data.toLocation = ''
    add_data.toLocationData.address = ''
    add_data.toLocationData.area = ''
    add_data.toLocationData.id = ''
    add_data.toLocationData.isSta = ''
    add_data.toLocationData.lnglat = ''
    add_data.toLocationData.name = ''
    add_data.toLocationData.tel = ''
    add_data.toLocationData.type = ''
    add_data.toLocationId = ''
    add_data.userId = ''
    add_data.id = ''
    add_data.needSeats = '0'
    add_data.priceNeedSeats = ''
     add_data.carConfig= ''
    add_data.flightTime = ''
    add_data.days = ''
    // add_data.isHighSpeed = '1'
    add_data.type = ''
    add_data.price = ''
    add_data.ensureMoney  = ''
    add_data.regularCarMoney  = ''
    add_data.points = []
    add_data.persons = []





    add_data.returnOrder.fromLocation = ''
    add_data.returnOrder.toLocation = ''
    add_data.returnOrder.personNum = ''
    add_data.returnOrder.cusName = ''
    add_data.returnOrder.cusMobile = ''
    add_data.returnOrder.remark = ''
    add_data.returnOrder.serviceManRemark = ''
        add_data.returnOrder.driverRemark = ''
    add_data.returnOrder.flightDate = ''
    add_data.returnOrder.landDate = ''
    add_data.returnOrder.fromLocationId = ''
    add_data.returnOrder.toLocationId = ''
    add_data.returnOrder.fromLocationData.address = ''
    add_data.returnOrder.fromLocationData.area = ''
    add_data.returnOrder.fromLocationData.id = ''
    add_data.returnOrder.fromLocationData.isSta = ''
    add_data.returnOrder.fromLocationData.lnglat = ''
    add_data.returnOrder.fromLocationData.name = ''
    add_data.returnOrder.fromLocationData.tel = ''
    add_data.returnOrder.fromLocationData.type = ''
    add_data.returnOrder.toLocationData.address = ''
    add_data.returnOrder.toLocationData.area = ''
    add_data.returnOrder.toLocationData.id = ''
    add_data.returnOrder.toLocationData.isSta = ''
    add_data.returnOrder.toLocationData.lnglat = ''
    add_data.returnOrder.toLocationData.name = ''
    add_data.returnOrder.toLocationData.tel = ''
    add_data.returnOrder.toLocationData.type = ''

    add_data.returnOrder.routeSimpleName = ''
    add_data.returnOrder.needSeats = '0'
    add_data.returnOrder.priceNeedSeats = ''
    add_data.returnOrder.carConfig= ''
    add_data.returnOrder.flightTime = ''
    add_data.returnOrder.days = ''
    // add_data.returnOrder.isHighSpeed = '1'
    add_data.returnOrder.type = ''
    add_data.returnOrder.price = ''
    add_data.returnOrder.ensureMoney  = ''
    add_data.returnOrder.regularCarMoney  = ''
    add_data.returnOrder.points = []
    add_data.returnOrder.persons = []
    add_data.returnOrder.endTime = ''
    add_data.returnOrder.startTime = ''


    add_cusName_list.value = []
    add_cusName_index.value = 0
    add_cusName_off.value = ''
    add_cusName_list2.value = []
    add_cusName_index2.value = 0

    passing_points_list.value = []
    passing_points_index.value = 0
    passing_points_off.value = ''
    passing_points_list2.value = []
    passing_points_index2.value = 0
}
//#endregion

//#region 下拉数据
const aircraft_list = ref([])
const train_list = ref([])
const bus_list = ref([])
const getStationList_Data = ref([])
const getStationList_Data2 = ref([])
const list_data = () => {
    findStationCombo({
        page: {
            pageNum: 1,
            pageSize: 999,
        },
        stationTypes: ['AIRPORT']
    }).then(res => {
        aircraft_list.value = res.data.list
    })
    findStationCombo({
        page: {
            pageNum: 1,
            pageSize: 999,
        },
        stationTypes: ['TRAIN']
    }).then(res => {
        train_list.value = res.data.list
    })
    findStationCombo({
        page: {
            pageNum: 1,
            pageSize: 999,
        },
        stationTypes: ['BUS']
    }).then(res => {
        bus_list.value = res.data.list
    })
    findStationCombo({
        page: {
            pageNum: 1,
            pageSize: 999,
        },
        stationTypes: ['TRAIN','BUS','AIRPORT']
    }).then(res => {
        stationList.value = res.data.list
       
    })
    getStationListPages({
        page: {
            pageNum: 1,
            pageSize: 999,
        },
        stationTypes: ['DIY'],
    }).then(res => {
        if (res.code == 1) {
            getStationList_Data.value = res.data.list
             getStationList_Data2.value = res.data.list
        }
    })
}
//#endregion

//#region 时间增加30分钟
const add30Minutes = (dateTimeStr) => {
    let date = new Date(dateTimeStr);
    date.setMinutes(date.getMinutes() + 30);

    let year = date.getFullYear();
    let month = (date.getMonth() + 1).toString().padStart(2, '0');
    let day = date.getDate().toString().padStart(2, '0');
    let hours = date.getHours().toString().padStart(2, '0');
    let minutes = date.getMinutes().toString().padStart(2, '0');

    let newDateTimeStr = `${year}-${month}-${day} ${hours}:${minutes}`;
    return newDateTimeStr;
}

//#endregion
//#region 时间增加15分钟
const add15Minutes = (dateTimeStr) => {
    let date = new Date(dateTimeStr);
    date.setMinutes(date.getMinutes() + 15);

    let year = date.getFullYear();
    let month = (date.getMonth() + 1).toString().padStart(2, '0');
    let day = date.getDate().toString().padStart(2, '0');
    let hours = date.getHours().toString().padStart(2, '0');
    let minutes = date.getMinutes().toString().padStart(2, '0');

    let newDateTimeStr = `${year}-${month}-${day} ${hours}:${minutes}`;
    return newDateTimeStr;
}

//#endregion
//#region 时间提前2个小时
// 定义表示时间的字符串
const add2hours = (dateString) => {
    console.log(dateString);
    // 将时间字符串转换为日期对象
    let dateObj = new Date(dateString);

    // 将时间提前4个小时
    dateObj.setHours(dateObj.getHours() - 2);

    // 格式化新的日期时间
    let year = dateObj.getFullYear();
    let month = ("0" + (dateObj.getMonth() + 1)).slice(-2);
    let day = ("0" + dateObj.getDate()).slice(-2);
    let hours = ("0" + dateObj.getHours()).slice(-2);
    let minutes = ("0" + dateObj.getMinutes()).slice(-2);

    let newDateString = year + "-" + month + "-" + day + " " + hours + ":" + minutes;

    console.log(newDateString);
    // 输出新的日期时间字符串
    return newDateString;


}
//#endregion

//#region 时间提前4个小时
// 定义表示时间的字符串
const add4hours = (dateString) => {
    console.log(dateString);
    // 将时间字符串转换为日期对象
    let dateObj = new Date(dateString);

    // 将时间提前4个小时
    dateObj.setHours(dateObj.getHours() - 4);

    // 格式化新的日期时间
    let year = dateObj.getFullYear();
    let month = ("0" + (dateObj.getMonth() + 1)).slice(-2);
    let day = ("0" + dateObj.getDate()).slice(-2);
    let hours = ("0" + dateObj.getHours()).slice(-2);
    let minutes = ("0" + dateObj.getMinutes()).slice(-2);

    let newDateString = year + "-" + month + "-" + day + " " + hours + ":" + minutes;

    console.log(newDateString);
    // 输出新的日期时间字符串
    return newDateString;


}
//#endregion

// #region 提交
const serviceManRemark_off = ref(false)
const ok_btn = (e) => {
    if(add_data.price <= 0){
        serviceManRemark_off.value = true
    }
//     if(serviceManRemark_off.value){
//         if(!add_data.serviceManRemark){
//             return ElMessage({
//                message: '当用车费用为0或负数时，业务员备注不能为空',
//                type: 'warning',
//            })
//         }
    //    }

    let timeDate = new Date().getTime()
    if (add_data.flightDate) {
        let flightDate1 = new Date(add_data.flightDate).getTime()
        // if (flightDate1 < timeDate) {
        //     return ElMessage({
        //         message: '时间不能小于当前时间',
        //         type: 'warning',
        //     })
        // }
    }
    if (add_data.returnOrder.flightDate) {
        let flightDate2 = new Date(add_data.returnOrder.flightDate).getTime()
        // if (flightDate2 < timeDate) {
        //     return ElMessage({
        //         message: '时间不能小于当前时间',
        //         type: 'warning',
        //     })
        // }
    }
    if (add_data.landDate) {
        let landDate1 = new Date(add_data.landDate).getTime()
        // if (landDate1 < timeDate) {
        //     return ElMessage({
        //         message: '时间不能小于当前时间',
        //         type: 'warning',
        //     })
        // }
    }
    if (add_data.returnOrder.landDate) {
        let landDate2 = new Date(add_data.returnOrder.landDate).getTime()
        // if (landDate2 < timeDate) {
        //     return ElMessage({
        //         message: '时间不能小于当前时间',
        //         type: 'warning',
        //     })
        // }
    } 






    if (add_data.landDate == '' && add_data.flightDate == '' ) {
        return ElMessage({
            message: '请选择时间',
            type: 'warning',
        })
    } else if (!add_data.fromLocation) {
        return ElMessage({
            message: '请选择开始地址',
            type: 'warning',
        })
    }
    else if (!add_data.toLocation) {
        return ElMessage({
            message: '请选择目的地址',
            type: 'warning',
        })
    }

    if (!add_data.personNum) {
        return ElMessage({
            message: '请输入预约人数',
            type: 'warning',
        })
    } else if (!add_data.cusName) {
        return ElMessage({
            message: '请输入乘车人姓名',
            type: 'warning',
        })
    } else if (!add_data.cusMobile) {
        return ElMessage({
            message: '请输入乘车人电话',
            type: 'warning',
        })
    } else if (!add_data.isReturn) {
        return ElMessage({
            message: '请输入是否返程',
            type: 'warning',
        })
    } else if (!add_data.price) {
        return ElMessage({
            message: '请输入用车费用',
            type: 'warning',
        })
    }
    if (add_data.cusMobile.length != 11) {
        return ElMessage({
            message: '请输入正确的手机号',
            type: 'warning',
        })
    }
    console.log(add_data.isReturn == 'true',add_data.isReturn)
     if (add_data.isReturn == 'true') {
        console.log(add_data.returnOrder.landDate && add_data.returnOrder.flightDate)
        if (add_data.returnOrder.landDate =='' && add_data.returnOrder.flightDate == '' ) {
            return ElMessage({
            message: '请选择返程时间',
            type: 'warning',
        })
        }
    } 
    if (add_data.isReturn == 'true') {
        let time1 = add_data.landDate? add_data.landDate :add_data.flightDate
        let time2 = add_data.returnOrder.landDate? add_data.returnOrder.landDate :add_data.returnOrder.flightDate
        time1 = time1.split(' ')[0]
        time2 = time2.split(' ')[0]
        time1 =new Date(time1).getTime()
        time2 =new Date(time2).getTime()
        if (time2 < time1 ) {
            return ElMessage({
            message: '返程订单时间不能小于正常订单时间',
            type: 'warning',
        })
        }
    }
  
    if (add_data.needSeats>0) {
        if ( add_data.needSeats < Number(add_data.personNum) + 1) {

            return ElMessage({
                message: '指定车型少于乘车人＋驾驶员，请重新选择',
                type: 'warning',
            })
        }
    }
    if (add_data.returnOrder.needSeats>0) {
        if ( add_data.returnOrder.needSeats < Number(add_data.returnOrder.personNum) + 1) {

            return ElMessage({
                message: '返程中指定车型少于乘车人＋驾驶员，请重新选择',
                type: 'warning',
            })
        }
    }
    

  


    if (!add_data.routeSimpleName.includes('集合点大巴')) {
        if (add_data.routeSimpleName.includes('接')) {
            for (let i = 0; i < aircraft_list.value.length; i++) {
                if (add_data.fromLocation == aircraft_list.value[i].station_name) {
                    add_data.fromLocationId = aircraft_list.value[i].id
                    add_data.fromLocationData.address = aircraft_list.value[i].station_name
                    add_data.fromLocationData.area = aircraft_list.value[i].station_name
                    add_data.fromLocationData.lnglat = aircraft_list.value[i].lng_lat
                }
                if (add_data.isReturn == 'true' || add_data.isReturn == '是') {
                    if (add_data.returnOrder.toLocation == aircraft_list.value[i].station_name) {
                        add_data.returnOrder.toLocationId = aircraft_list.value[i].id
                        add_data.returnOrder.toLocationData.address = aircraft_list.value[i].station_name
                        add_data.returnOrder.toLocationData.area = aircraft_list.value[i].station_name
                        add_data.returnOrder.toLocationData.lnglat = aircraft_list.value[i].lng_lat
                    }

                }
            }
            for (let i = 0; i < train_list.value.length; i++) {
                if (add_data.fromLocation == train_list.value[i].station_name) {
                    add_data.fromLocationId = train_list.value[i].id
                    add_data.fromLocationData.address = train_list.value[i].station_name
                    add_data.fromLocationData.area = train_list.value[i].station_name
                    add_data.fromLocationData.lnglat = train_list.value[i].lng_lat
                }
                if (add_data.isReturn == 'true' || add_data.isReturn == '是') {
                    if (add_data.returnOrder.toLocation == train_list.value[i].station_name) {
                        add_data.returnOrder.toLocationId = train_list.value[i].id
                        add_data.returnOrder.toLocationData.address = train_list.value[i].station_name
                        add_data.returnOrder.toLocationData.area = train_list.value[i].station_name
                        add_data.returnOrder.toLocationData.lnglat = train_list.value[i].lng_lat
                    }

                }
            }
        } else {
            for (let i = 0; i < aircraft_list.value.length; i++) {
                if (add_data.toLocation == aircraft_list.value[i].station_name) {
                    add_data.toLocationId = aircraft_list.value[i].id
                    add_data.toLocationData.address = aircraft_list.value[i].station_name
                    add_data.toLocationData.area = aircraft_list.value[i].station_name
                    add_data.toLocationData.lnglat = aircraft_list.value[i].lng_lat
                }
                if (add_data.isReturn == 'true' || add_data.isReturn == '是') {
                    if (add_data.returnOrder.fromLocation == aircraft_list.value[i].station_name) {
                        add_data.returnOrder.fromLocationId = aircraft_list.value[i].id
                        add_data.returnOrder.fromLocationData.address = aircraft_list.value[i].station_name
                        add_data.returnOrder.fromLocationData.area = aircraft_list.value[i].station_name
                        add_data.returnOrder.fromLocationData.lnglat = aircraft_list.value[i].lng_lat
                    }

                }
            }
            for (let i = 0; i < train_list.value.length; i++) {
                if (add_data.toLocation == train_list.value[i].station_name) {
                    add_data.toLocationId = train_list.value[i].id
                    add_data.toLocationData.address = train_list.value[i].station_name
                    add_data.toLocationData.area = train_list.value[i].station_name
                    add_data.toLocationData.lnglat = train_list.value[i].lng_lat
                }
                if (add_data.isReturn == 'true' || add_data.isReturn == '是') {
                    if (add_data.returnOrder.fromLocation == train_list.value[i].station_name) {
                        add_data.returnOrder.fromLocationId = train_list.value[i].id
                        add_data.returnOrder.fromLocationData.address = train_list.value[i].station_name
                        add_data.returnOrder.fromLocationData.area = train_list.value[i].station_name
                        add_data.returnOrder.fromLocationData.lnglat = train_list.value[i].lng_lat
                    }

                }
            }
        }
    }else {
    
    add_data.meetStationId = bus_list.value[0].id
     
    }
    if (aircraft_radio.value == '包车') {
        add_data.type = '1'
    } else {
        add_data.type = '0'
    }
    if (aircraft_radio2.value == '包车') {
        add_data.returnOrder.type = '1'
    } else {
        add_data.returnOrder.type = '0'
    }
    if (add_data.isReturn == 'true' || add_data.isReturn == '是') {
        add_data.returnOrder.points = passing_points_list2.value
        add_data.returnOrder.persons = add_cusName_list2.value
        add_data.points = passing_points_list.value
        add_data.persons = add_cusName_list.value
        add_data.returnTime = add_data.returnOrder.flightDate?add_data.returnOrder.flightDate:add_data.returnOrder.landDate
    } else {
        add_data.points = passing_points_list.value
        add_data.persons = add_cusName_list.value
    }

    let useCarCompanyName1 = ''
   for(let i = 0; i<cusOptions2.value.length;i++){
       if(add_data.userId ==cusOptions2.value[i].userId ){
        useCarCompanyName1 = cusOptions2.value[i].cusCompanyName
       }
   }
   add_data.useCarCompanyName = useCarCompanyName1
   add_data.returnOrder.useCarCompanyName = useCarCompanyName1

   let useCarDutyInfo1 = ''
   for(let i = 0; i<getAllDutyOfCustom_list2.value.length;i++){
       if(add_data.useCarDutyUserId ==getAllDutyOfCustom_list2.value[i].ftUserId ){
        useCarDutyInfo1 = getAllDutyOfCustom_list2.value[i].ftUserId+'-'+getAllDutyOfCustom_list2.value[i].realName+'-'+getAllDutyOfCustom_list2.value[i].loginPhone
       }
   }
   add_data.useCarDutyInfo = useCarDutyInfo1
   add_data.returnOrder.useCarDutyInfo = useCarDutyInfo1
    let serviceMan1 = ''
    for(let i = 0; i<getServiceMans_list2.value.length;i++){
        if(add_data.serviceMan ==getServiceMans_list2.value[i].ftUserId ){
            serviceMan1 = getServiceMans_list2.value[i].ftUserId+'-'+getServiceMans_list2.value[i].realName+'-'+getServiceMans_list2.value[i].loginPhone
        }
    }
    add_data.serviceMan = serviceMan1
    add_data.returnOrder.serviceMan = serviceMan1
    // let luser = JSON.parse(localStorage.getItem("luser"))
    // add_data.userId = luser.uname
    console.log(add_data)
    if (add_data.isReturn == false) {
           delete add_data.returnOrder
    }
    if(add_data.flightNum){
        if(add_data.routeSimpleName.includes('接')){
            add_data.startTime =add_data.landDate+':00'
          }else{
            add_data.startTime = add_data.flightDate+':00'
          } 
            
    } else {
        if(add_data.routeSimpleName.includes('接')){
            add_data.startTime =add_data.landDate+':00'
          }else{
            add_data.startTime = add_data.flightDate+':00'
          } 
    }
    if(add_data.isReturnAdd == 'true' || add_data.isReturnAdd == '是'){
        if(add_data.returnOrder.flightNum){
        if(add_data.returnOrder.routeSimpleName.includes('接')){
            add_data.returnOrder.startTime =add_data.returnOrder.landDate+':00'
          }else{
            add_data.returnOrder.startTime = add_data.returnOrder.flightDate+':00'
          } 
            
    } else {
        if(add_data.returnOrder.routeSimpleName.includes('接')){
            add_data.returnOrder.startTime =add_data.returnOrder.landDate+':00'
          }else{
            add_data.returnOrder.startTime = add_data.returnOrder.flightDate+':00'
          } 
    }
    }else{
        add_data.returnOrder.startTime = ''
    }
        let cusInfo = ''
   
   if(add_cusName_list.value.length > 0){
       let cusInfo_one = {
           name:add_data.cusName,
           mobile:add_data.cusMobile
       }
       add_cusName_list.value.unshift(cusInfo_one)
       let cusInfo_list = []
            for(let i = 0;i<add_cusName_list.value.length;i++){
                let cusInfo_data = ''
                if (add_cusName_list.value[i].name) {
                    cusInfo_data = add_cusName_list.value[i].name+'-'+add_cusName_list.value[i].mobile
                    cusInfo_list.push(cusInfo_data)
                }
            }
            cusInfo = cusInfo_list.join(',')
     
    //    cusInfo = add_cusName_list.value.map(item => `${item.name}-${item.mobile}`).join(',');
   }else{
       cusInfo = add_data.cusName+'-'+add_data.cusMobile
}

add_data.cusInfo = cusInfo
add_cusName_list.value.shift()
let cusInfo2 = ''
       
       if(add_cusName_list2.value.length > 0){
           let cusInfo_one2 = {
               name:add_data.returnOrder.cusName,
               mobile:add_data.returnOrder.cusMobile
           }
          
           add_cusName_list2.value.unshift(cusInfo_one2)
           let cusInfo_list = []
            for(let i = 0;i<add_cusName_list2.value.length;i++){
                let cusInfo_data = ''
                if (add_cusName_list2.value[i].name) {
                    cusInfo_data = add_cusName_list2.value[i].name+'-'+add_cusName_list2.value[i].mobile
                    cusInfo_list.push(cusInfo_data)
                }
            }
            cusInfo2 = cusInfo_list.join(',')
        //    cusInfo2 = add_cusName_list2.value.map(item => `${item.name}-${item.mobile}`).join(',');
       }else{
           cusInfo2 = add_data.returnOrder.cusName+'-'+add_data.returnOrder.cusMobile
   }
 
   add_data.returnOrder.cusInfo = cusInfo2
   add_cusName_list2.value.shift()
   if(add_data.needSeats == '0' || add_data.needSeats == ''){
        add_data.needSeats = null
    }
    if(add_data.priceNeedSeats == '0' || add_data.priceNeedSeats == ''){
        add_data.priceNeedSeats = null
    }
    
    if(add_data.returnOrder.needSeats == '0' || add_data.returnOrder.needSeats == ''){
        add_data.returnOrder.needSeats = null
    }
    if(add_data.returnOrder.priceNeedSeats == '0' || add_data.returnOrder.priceNeedSeats == ''){
        add_data.returnOrder.priceNeedSeats = null
    }
    add_data.isReturnAdd =  retuen_data.value.isReturnAdd
    add_data.isReturn  =  retuen_data.value.isReturn 
    add_data.returnId  =  retuen_data.value.returnId
    edit(add_data).then(res => {
            add_data.needSeats = '0'
            add_data.returnOrder.needSeats = '0'
            if (res.code == 1) {
               if(e == '2'){
                console.log(res.data.id)
                emit('myClick', res.data.id);
               }else{
                emit('myClick', false);
               }
                return ElMessage({
                    message: res.msg,
                    type: 'success',
                })
            } else {
              
                // emit('myClick', false);
                return ElMessage({
                    message: res.msg,
                    type: 'warning',
                })
            }
        })

}
// 整理数据
const organize_data = () => {
    

}
// #endregion

</script>

<style scoped lang='scss'>
.div_map {
    position: relative;
    left: 0;
    top: 0;
}

.map_input {
    width: 100%;
    position: absolute;
    z-index: 1;
    display: flex;
    justify-content: center;

}

.map_input2 {
    width: 100%;
    position: absolute;
    z-index: 1;
    display: flex;
    justify-content: center;
    top: 34px;

}

.div_bg:hover {


    background-color: darkgray;
}
</style>

<style>
.el-table .el-table__cell {
    padding: 0px !important;
}



#tab-aircraft_deliver {
    color: red;
}

#tab-train_deliver {
    color: red;
}

#tab-bus_deliver {
    color: red;
}

.col-items::-webkit-scrollbar {
    width: 5px !important;
}

.col-items>label {
    margin-left: 0px !important;
    margin-top: 5px;
    width: 100%;
}
</style>
